Categories | Question details Back To List | ||
How to coding DhtmlxGrid in asp.net following the combo box selection I want to write the code following the combo box selection to get the data from SQL server, and provide the XML result to DhtmlxGrid control. how to dynamic rewrite the DhtmlxGrid datasource? This is a display DhtmlxGrid control .aspx file page. <script language="javascript"> function doOnLoad(){ mygrid = new dhtmlXGridObject('gridbox'); mygrid.setImagePath("codebase/imgs/"); mygrid.setHeader("No, Part No, Name1, Name2"); mygrid.setInitWidths("30,150,120,150") mygrid.setColAlign("Left,left,left,left") mygrid.setColTypes("txt,txt,txt,txt"); mygrid.setSkin("light") mygrid.init(); mygrid.clearAll(); gridQString = "GetGridRecord.aspx"; mygrid.loadXML(gridQString); } </script> <body onload="doOnLoad()" style="overflow:hidden"> <div id="gridbox" width="100%" height="300px" style="background-color:white;" > </body> Answer posted by Support on Apr 25, 2008 03:58 You can reload grid in any moment by using combo.attachEvent("onChange",function(){ mygrid.clearAll(); mygrid.loadXML("data.aspx?combo="+this.getActualValue()) }); |