Categories | Question details Back To List | ||
grid reloads when a row is selected Hi I'm having problems with a grid. I'm loading a grid with up to 200 records using xml.This grid displays about 10 records at a time. If I scroll down the grid, to the 30th record for example, and select this record the grid refreshes and displays the first 10 records. Scrolling down to the 30th record then reveals that this is still highlighted. I would like the selected record to remain in view when I select it. Please can you help? function doInitGrid(){ mygrid = new dhtmlXGridObject('mygrid_container'); mygrid.setImagePath("dhtmlx/imgspro/"); window.dhx_globalImgPath="dhtmlx/imgspro/"; mygrid.setSkin("light"); mygrid.enableMultiline(true); mygrid.attachEvent("onRowDblClicked",onRowDblClicked); mygrid.attachEvent("onRowSelect",onRowSelect); mygrid.enableSmartRendering(true,200); mygrid.attachHeader("#combo_filter,#text_filter,#combo_filter,#combo_filter,#text_filter,#text_filter,#text_filter,,#cspan,#cspan,#cspan,#cspan,#cspan,#text_filter,"); mygrid.init(); var d = new Date(); var t=d.getTime(); //we need to add a variable time so that Spry thinks it is a new query otherwise it doesn't refresh data during the session mygrid.loadXML("mnaQ2XDDeliveries.cfc?method=fncQryOrderItems&_cf_nodebug=true&cachebuster="+t); } function onRowDblClicked(rowID,celInd){ mnaOrder=mygrid.cells(rowID,1).getValue(); mnaOrderLine=mygrid.cells(rowID,7).getValue(); // CAREFUL commit the grid changes before opening the window // window.open("DisplayOrderDetails.cfm?mnaOrder="+mnaOrder+"&mnaOrderLine="+mnaOrderLine,"ShowOrderDetails","location=false,menubar=false,width=510,height=300"); testwindow=window.open("DisplayOrderDetails.cfm?mnaOrder=readyp-"+mnaOrder+"&mnaOrderLine="+mnaOrderLine,"ShowOrderDetails","location=false,menubar=true,width=980,height=700,resizable=1,scrollbars=1"); testwindow.focus(); return true; } function onRowSelect(rowID,celInd){ alert(rowID+" "+celInd); mygrid.selectRow(rowID); alert(rowID+" "+celInd); return true; } Answer posted by dhxSupport on Jul 27, 2009 01:54 >> If I scroll down the grid, to the 30th record for example, and select this record the grid refreshes and displays the first 10 records Unfortunately we cannot reproduce this issue locally. Could you please provide full example or link where this issue could be reconstructed. Answer posted by Matthew on Jul 28, 2009 02:13 Hi you can see this on our test server at 80.0.187.121/readyparcels/orderhistory.cfm. If you email me your ip address I will let you through the firewall and reply with a username and password that you need to use for the application.
|