Hello,
I am trying to set the the filter option dynamically by getting the ColumnCount and looping to add the text_filter but I am having issues since the data has to be loaded first before returning a count for the mygrid.getColumnCount().
I have tried within grid.attachEvent “onXLE” as well but the header is returning the text string on the first row, my guess is that it doesn’t work with the attachHeader. Do you have any other solutions to set the header filters since our columns are dynamic with a different columns total ?
Sample code (first option should be #select_filter and after that they should all be set to #text_filter depending on the total columns):
function setfilters(){
var colcount = grid.getColumnCount();
var output = '';
for(var i = 1; i < colcount; i++){
var filters = ",#text_filter";
output += filters;
}
return output;
}
grid.attachHeader("#select_filter" + setfilters());
Thank you,
Pele