Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Geoff on Jan 30, 2009 04:31
open dhtmlx forum
Custom grid filter from XML

What is the XML syntax for creating custom server-side filters directly in the XML? I am currently creating the filters in javascript like this and all works well:

     grid.setColSorting('server,server'));
     grid.attachHeader("<input type='text' onclick=.../>,<input type='text'...);
     grid.loadXML("file.xml");

The XML file is actually being constructed at run-time to load data a bit at a time from the server, and as I said, it is all working just fine, but I would like to be able to construct my filters directly in the xml file and not have to use setColSorting() or attachHeader().
Thanks.
Answer posted by Support on Jan 30, 2009 05:38
>>  grid.setColSorting('server,server'));
can be mapped to the 
       <column sort="server" ...

>>  grid.attachHeader("<input type='text' onclick=.../>,<input type='text'...);
While there is no direct representative in XML, can be executed through afterInit section

<rows>
    <head>
          <column .. normal configuration here
          ...

         <afterInit><call command="attachHeader"><param><![CDATA[<input type='text' onclick=.../>,<input type='text'...]]></param></call></afterInit>
   </head>
   ...