Categories | Question details Back To List | ||
setColumnsVisiblity in version 2.0 Is there any change in which the function setColumnsVisiblity in used in version 2.0? We used version 1.5 in which the following xml worked fine.The parent xml has only the first column as visible others as hidden.This <?xml version="1.0" encoding="UTF-8"?> <rows> <head> <column width="20" type="tree" sort="na"></column> <column width="20" type="ro" sort="na"></column> <column width="20" type="ro" sort="na"></column> <column width="20" type="ro" sort="na"></column> <column width="20" type="ro" sort="na"></column> <column width="20" type="ro" sort="na"></column> <column width="20" type="ro" sort="na"></column> <afterInit> <call command="attachHeader"> <param> Entity Columns,Entity Name,Data Type,Derived Data Type,Display Format,Rounding,ColCalMethod </param> <param> font-size: 11px; font-family: Arial ;font-weight:bold ; color :#0A64B7;text-align:center; </param> </call> <call command="setColumnsVisibility"> <param>false,true,true,true,true,true,true</param> </call> <call command="setInitWidthsP"> <param>100,0,0,0,0,0,0</param> </call> </afterInit> </head> <row id="c_ASSOCIATE" xmlkids="1"> <cell><![CDATA[ASSOCIATE]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> </row> <row id="c_METRIC" xmlkids="1"> <cell><![CDATA[METRIC]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> </row> </rows> This is the parents xml and the kids xml is smthng like this: <rows parent="c_ASSOCIATE"> <row id="e_365" xmlkids="1"> <cell><![CDATA[AnuradhaE1]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> </row> <row id="e_563" xmlkids="1"> <cell><![CDATA[Anuradha_Entity]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> </row> <row id="e_1543" xmlkids="1"> <cell><![CDATA[anuradha_test]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> </row> <row id="e_403" xmlkids="1"> <cell><![CDATA[asawari_test]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> </row> <row id="e_-1" xmlkids="1"> <cell><![CDATA[DUMMY]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> </row> <row id="e_924" xmlkids="1"> <cell><![CDATA[Employees]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> <cell><![CDATA[]]></cell> </row> </rows> But now in version 2.0, when i click on parent node, my hidden columns headers are visible in form of some crunched up text.This did not happen in version 1.5. Can u help in this? Answer posted by dhxSupport on May 04, 2009 05:26 In the version 2.0 you should use method setColumnHidden(columnIndex,state); Answer posted by Asawari on May 04, 2009 05:38 How should this be used if we are loading grid by xml? Answer posted by Alex (support) on May 04, 2009 08:20 Please, see the answer http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=9345&a=14867 |