What is the easiest way to copy a row and insert the new row at the end. I want to copy the row at some point. And have that saved somewhere so I can use it at a later time. The row I copied from will get changed and those changes need not reflect in the copy of the row. What’s the best method to save a copy of a row for later use and then paste the row at the end of the grid when needed (of course I will need to update the rowid, but I can do that).
Pro version of dhtmlxGrid has extentions: coping selected row to the clipboard and serialize grid to the csv format. You can use this extentions to save certain row. Please see more information here
dhtmlx.com/docs/products/dhtmlxG … grid_excel
While adding new row you can set new row’s values:
addRow(new_id, text, ind)
new_id - row ID, must be unique
text - row values, may be a comma separated list or an array
ind - index of new row, optional, row added to the last position by default
What I am trying to do is give the ability to add a new row with default values. The row contains userdata and also xml data (combo box) within the cell that needs to be processed so I can’t just send in an array of values. I need a way to add a row to the end of the grid. The last row of the grid, when it loads, is the row that can be copied to do so. It is a blank row with default values.
Unfortunately dhtmlxGrid hasn’t appropriate method which can allow you do that automatically. After adding row you should manually insert user data and xml for the “combo” column.