Categories | Question details Back To List | ||
refresh grid from XML on double clic Hi there: I have a problem. I try to refresh a grid (on double click over a row) , this works ok, but i have a little problem with an error javascript. The javascript error say: c is null [Break on this error] var c = this.getRowById(row_id);var cel...ldNodes[col]);return this.cells4(cell)}, My code program: mygrid.clearAll(); mygrid.updateFromXML("../../ConsGetFichColecToGrid?idCol="+id); I try too: mygrid.clearAll(); mygrid.loadXML("../../ConsGetFichColecToGrid?idCol="+id); If I dont write the line "mygrid.clearAll();" I havent this javascript error, but the grid dont refresh and the new rows are added after the actual rows in the grid. Sorry for my bad english. Answer posted by dhxSupport on Mar 26, 2009 10:05 Could you please provide us any kind of sample where we can reproduce this issue? What version of dhtmlxGrid do you use? Answer posted by Fernando S. on Mar 26, 2009 11:06 Hi there: Version 2.0 This is the code: var mygrid = new dhtmlXGridObject('grid_body'); mygrid.setImagePath("../../dhtmlx/dhtmlxGrid/codebase/imgs/"); mygrid.setSkin("light"); mygrid.setHeader(", Nombre, Tipo de archivo, Tamaño, Fecha"); mygrid.setInitWidths("40,300,160,100,*"); mygrid.setColAlign("right,left,left,right,left"); mygrid.setColTypes("img,ro,ro,ro,ro"); mygrid.init(); mygrid.loadXML("../../ConsGetFichColecToGrid?idCol="+id); In other place: mygrid.attachEvent("onRowDblClicked", function(id){ var tipoArchivo = mygrid.cells(id,2).getValue(); if(tipoArchivo == 'Carpeta'){ tree.openItem(id); mygrid.clearAll(); mygrid.loadXML("../../ConsGetFichColecToGrid?idCol="+id); } }); Thanks |