Hello,
I have around 10 columns in which first column is check box column, second column is of String, and third column is a date column, rest of the columns are of integer, I wanted a dropdown filter in the second column header, so i have added the following code.
mygrid.attachHeader("#rspan,#select_filter,#rspan");
Now I am getting the dropdwon in the second column header, but it is empty, i have included dhtmlxgrid_filter.js, could you please help us.
Thanks in advance.
How is data loading in the grid?
If you adding rows through addRow command - be sure to call
grid.refreshFilters();
after all necessary rows will be added to the grid.
No i am not using any addrow, infact i just want only update from the grid, no rows deletion/addition. from my http handler i am populating the rows like
Dim connector As dhtmlxGridConnector = New dhtmlxGridConnector("SELECT IsDone,HotelName,Date,UniqueVisits,TotalVisits,ReservationClicks,DirectTrackedRevenue,DirectReservations,DirectRoomnights,ClickstoReservationWidgets,HyattClickthroughs,CalculatedColumns,DisabledColumns FROM ClientFact " + whereCondition, “ID”, dhtmlxDatabaseAdapterType.SqlServer2005, ConfigurationManager.ConnectionStrings(“ConnectionString”).ConnectionString)
Return connector
and in the aspx page i have teh following scripts
mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.setImagePath(’…/JScripts/dhtmlx/imgs/’);
mygrid.setSkin(“light”);
var myColumns = “Is Done,Account Name,Date,Unique Visits,…”;
mygrid.setHeader(myColumns);
mygrid.attachHeader("#rspan,#select_filter,#rspan");
mygrid.setColTypes(“ch,ro,ro,ed,ed,ed,ed,ed,ed,ed,ed…”)
mygrid.setColSorting(“str,str,date,int,int,int,int,int,int…”)
mygrid.init();
mygrid.loadXML(“Edit.ashx”);
//============================================================================================
myDataProcessor = new dataProcessor(“Edit.ashx”); //lock feed url
myDataProcessor.setTransactionMode(“POST”,true); //set mode as send-all-by-post
myDataProcessor.setUpdateMode(“off”); //disable auto-update
myDataProcessor.init(mygrid); //link dataprocessor to the grid
NOTE: “…” i have given the actual values