Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by oVox on Feb 25, 2008 05:46
open dhtmlx forum
Grid all XML

Hi, i bought Grid 1.6 and im trying to implement it on .NET

I need to set all the Grid parameter at the XML, so, how can i do this (now in Javascript) directly at XML...

mygrid.setHeader("MyColumn1, MyColumn2, MyColumn3");
mygrid.setInitWidths("*,310,80");
mygrid.setColAlign("left,left,right");
mygrid.setColTypes("ro,ro,ed ");
mygrid.setColSorting("str,str,int ");
mygrid.setColumnIds("Pk1, Pk2, Pk3 ");
mygrid.attachHeader("#rspan,#rspan,<select name='MySelect' onchange='doSearch(arguments[0]||event)' onclick='(arguments[0]||window.event).cancelBubble=true;' ><option value='1' >YES</option><option value=' 0 '>NO</option><option value='' selected='selected'>ALL</option></select>");


Regards.
Answer posted by Support on Feb 25, 2008 09:18
Config can be reflected in XML as

<rows>
    <head>
        <column type="ro" width="*" sort="str" id="Pk1">MyColumn1</column>
        <column type="ro" width="310" sort="str" id="Pk2">MyColumn2</column>
        <column type="ed" width="80" sort="int" id="Pk3">MyColumn3</column>
        <afterInit>
            <call command="attachHeader">
                <param><![CDATA[
                    #rspan,#rspan,<select name='MySelect' onchange='doSearch(arguments[0]||event)' onclick='(arguments[0]||window.event).cancelBubble=true;' >
        <option value='1' >YES</option><option value=' 0 '>NO</option>
        <option value='' selected='selected'>ALL</option>
    </select>
                ]]></param>
            </call>
        </afterInit>
    </head>
</rows>