Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Geoff Walker on Nov 03, 2008 09:20
open dhtmlx forum
Filters with server-side loading of Grid

I am using server-side loading of your grid control and it works really well with 40000+ records. I have also implemented some custom server filters in the column headers, but as soon as the first filtered results are displayed, the filters disappear. What am I doing wrong?

example Javascript:
grid.attachHeader("<input type='text' class='dxfilter' id='Id_textfltr' onkeyup='applyDXFilters()' style='width: 60px;'/>,<select id='Queue_selectfltr' class='dxfilter' onchange='applyDXFilters()' style='width: 72px;'><option value=''/><option value='FRESH'>");

The 'applyDXFilters' function clears the grid and then produces the proper filtered XML, but when the XML is rendered, as I said, the custom filters disappear from the header.

Also, when I first click on the filter, I get a Javascript error stating "Line 823: 'this.rowsBuffer[...].idd' is null or not an object".
Answer posted by Support on Nov 04, 2008 01:47
While reloading data from XML, be sure that response XML contains only data part of grid. If it will contain header section, it will cause full grid structure reset ( which will drop all headers line ) 
>>Line 823: 'this.rowsBuffer[...].idd' is null or not an object".
Error means that you tries to access not existing row, most probably you have client side sorting active for this column and click on filter activates sorting, which can't be performed on client side, because of dyn. loading mode. 
To block such behavior, you can add onclick event code to custom inputs
<input type='text' onclick='(arguments[0]||event).cancelBubble=true;' ...