Categories | Question details Back To List | ||
can i edit the cells of subGrid Can i edit the cells of subgrid? I have loaded the subgrid but when i double clicks on the cell , the value of column get set in parent grid , but i want to edit that cell how can i do that? 2nd question-- i want trap the event but i failed to handle for the events for the subgrid. i have added the code as follows mygrid.attachEvent("onSubGridCreated",testEvent); function testEvent(oGrid,x,y) { alert("Hi"); return true; } here i am not getting the alert message , but subgrid is created properly (means event should be generated ) Answer posted by Support on Jan 19, 2009 06:11 >>I have loaded the subgrid but when i double clicks on the cell Issue can't be reconstructed locally. Events in main and sub-grids are separated, so double-click in sub-grid must activate edit in it, not in parent grid. >>i want trap the event but i failed to handle for the events for the subgrid. The code is correct and works correctly in local samples. Which version of grid you are using? Working sample sent by email, if issue still occurs for you - please send any kind of sample where it can be reconstructed. Answer posted on Jan 19, 2009 20:07 Answer posted by swaroop on Jan 19, 2009 20:15 I failed to mention that i am using the cell type grid, and not the subrow. by using cell type "grid" i can open different subgrids on the same row.but if i want to edit that subgrid then it is not giving chance to edit. above 2 questions are regarding the subgrid which is created by the cell type "grid" Answer posted by Support on Jan 20, 2009 08:39 The "grid" as editor doesn't trigger any events, and was designed to be used as rich-selector only. Its default logic closes its on any selection attempt, so it not possible to edit info in it. Technically, with small code modifications it can be changed, but in such case it will be not clear how close such editor. codebase\excells\dhtmlxgrid_excell_grid.js dhtmlXGridObject.prototype.setSubGrid=function(grid,s_index,t_index){ if (!this._sub_grids) this._sub_grids=[]; this._sub_grids[s_index]=[grid,t_index]; grid.entBox.style.display="none"; var that=this; grid.attachEvent("onRowSelect",function(id){ that.editStop(); return true; }); Just comment onRowSelect event to prevent auto-closing. |