Is it possible to dynamically change the style for the xml_generic type in dhtmlxfolders? Specifically, I want to have two xml-generic types of items that have different height/width attributes. The current style is:
.dhx_folders_XML_GENERIC_item_selected, .dhx_folders_XML_GENERIC_item{
width:250px;
height:200px;
float:left;
}
I want to be able to switch to a different xsl format such as
myFolders.setItemType(“xml_generic”, “folderdetail.xsl”);
But for folderdetails.xsl I need the xml_generic width to be 600px and the height to be 250px. How can I change the xml_generic height and width when I use setItemType?
Thank you.
Hello,
There is setCSSBaseName method. It allows to define the css class for items. For example:
.dhx_folders_XML_GENERIC_item_selected, .dhx_folders_XML_GENERIC_item{
width:250px;
height:200px;
float:left;
}
.dhx_folders_XML_GENERIC600_item_selected, .dhx_folders_XML_GENERIC600_item{
width:600px;
height:200px;
float:left;
}
…
function redrawFolders(css_base){
myFolders.setCSSBaseName(css_base);
myFolders.setItemType(“xml_generic”, “folderdetail.xsl”);
}
redrawFolders(“xml_generic”);
redrawFolders(“xml_generic600”);