Categories | Question details Back To List | ||
Grid rows don't un-select Grid v1.6 rows selected when clicked, but don't un-select when another row clicked. (all rows clicked remain grey) This happens only with mygrid.load("xxxx.csv","","csv"). No problem with mygrid.loadXML("step3.xml") Tried in FF3 and IE7 CODE: var mygrid; function doInitGrid(){ mygrid = new dhtmlXGridObject('mygrid_container'); mygrid.setImagePath("codebase/imgs/"); mygrid.setHeader("a,Model,Qty,Price,b"); mygrid.setInitWidthsP("*,30,10,10,25"); mygrid.setColAlign("center,left,right,right,center"); mygrid.setSkin("light"); mygrid.setColSorting("na,str,int,na,na"); mygrid.setColTypes("ch,ed,ed,price,img"); mygrid.init(); //mygrid.loadXML("step3.xml"); mygrid.load("silverdata.csv","","csv"); } CSV FILE: ,,ring,100,20,ASM001.gif ,,ring,200,10,ASM001.gif ,,ring,150,20,ASM001.gif ,,ring,160,30,ASM001.gif ,,ring,190,15,ASM001.gif Answer posted by Support on Jun 25, 2008 01:50 When data loaded from CSV, by default, first value in each row taken as row ID, in your case this is empty value, which is equal for all rows - but grid need to have unique IDs for each row to work correctly. To fix issue you can a) change first value in each row, to something unique b) enable auto ID generation grid.enableCSVAutoID(true) Answer posted by Joe Forest on Jun 25, 2008 21:37 Thank you! |