Categories | Question details Back To List | ||
Activating the inline editor on the first column of the newly added record Hi support, I have a sortable grid, when I click a link (add record) it inserts an empty record in the grid table and sets its editability to true (by default the grid table act as a read only one). All works correctly but I am thinking about doing something else when I insert a new empty record the editor of the first column of the newly entered record must be activated. In other words when I insert a record the cursor should blink in the first column of the newly entered record as if the user has double clicked on it. Can this be achieved using selectCell()? If so how it can be done if selectCell() is not the right function then how I can do this operation? Thanks in advance Gopal Answer posted on May 21, 2007 16:27 The 5th parameter of selectCell allow to set the cell in edit mode. But there is one possible problem - If you have some button outside the grid, the next can be actual for you. Latest version of grid by default has next behaviour - "any click outside of grid close current active editor" When you clicking on any buttons - editor activated, but nearly immidiatly closed because there was a click outside of grid. To solve problem just block onclick event propaganation ouside grid, by setting event.cancelBubble=true; <div><a href="#" onclick="mygrid.selectCell(1,1,false,false,true);">Not work</a></div> <div><a href="#" onclick="mygrid.selectCell(1,1,false,false,true); (arguments[0]||event).cancelBubble=true;">Work</a></div> Answer posted by Alexandra (Support) on Nov 30, 2014 11:03 I hope this information will be enough for you. But you also can have a look at tab dhtml and web based excel spreadsheet. |