Hello,
I want to add a new WebDatagrid-Row by javascript. The new row should not be added at the end of the
grid. I want to place the row at a specific position. Best after the active row.
Because WebDataGrid doesnt' support adding row after a specific row. I try to add the row at the end and then sorting the grid. See my Javascript code:
// Get details from active row var activation = _grdTS.get_behaviors().get_activation(); var activeCell = activation.get_activeCell(); if (activeCell) { var activeRow = activation.get_activeCell().get_row(); var subSequence = activeRow.get_cellByColumnKey("Z_SUBSEQUENCE").get_value(); var rows = _grdTS.get_rows(); subSequence += 1; rows.add(["9999", subSequence]); var sorting = _grdTS.get_behaviors().get_sorting(); var columns = _grdTS.get_columns(); var sortCol = columns.get_columnFromKey("Z_SUBSEQUENCE") //sorting.clear(); sorting.addSortColumn(sortCol, 2); // Sort ascending sorting.applySort(); }
Adding the row at the end works fine. But after sorting the row is removed.
Can everybody help me with this problem.
Thanks in advance
Hello khsnet, I might have to test this sample in order to see if this could be achieved. I will create a case and send you update today.
Thank you,
Swetha