Categories | Question details Back To List | ||
Add Row below the selected row Hello , I am using dhtmlxGride, where I want to use addRow function to add the row for selected row. Mence I want to add the row below to the selected row. function addFmNode() { var fm_id=(new Date()).valueOf(); fmeaGrid.addRow(fm_id,['','add new fm here...','add effects here',''],fmeaGrid.getSelectedId()); } but when I execute this methode it will add the the row in last posion. Please help Answer posted by dhtxSupport on Jan 08, 2009 09:36 The third parameter of the fucntion addRow() is index of the position where row must be inserted. Function getSelectedId() returns selected row id. To add row below the selected row you should use the following code: fmeaGrid.addRow(fm_id,['','add new fm here...','add effects here',''],fmeaGrid.getRowIndex(fmeaGrid.getSelectedId())); |