how to get the value of the selected row in editable grid.
how to get the value of the selected row in editable grid.
There will be a + image in last cell of the current grid row,if we clicked it then a new row of grid will be added at the last only,but my task is to add a grid row very next to the clicked grid.I planned to get the value of the current grid and add 1 to it so that the new row of grid will be created very next to the current grid.could u please tell me how to get the value of the clicked grid row?
my code:
var rowCount = ${gridObject}.getStore().getCount();
${gridObject}.getStore().insert(rowCount, p_${gridName});
${gridObject}.getView().refresh();
${gridObject}.startEditing(rowCount, 0);
My plan is,
var rowValue = ${gridObject}.getStore()._________;
${gridObject}.getStore().insert(rowValue+1, p_${gridName});
${gridObject}.getView().refresh();
${gridObject}.startEditing(rowValue, 0);
You can define how a cell in a column is drawn by assigning a cell to the column. To get access to the entire model in that cell, make sure you are defining the column to use the entire model - something like this, assuming the model for the row is called MyModel
ColumnConfig<MyModel, MyModel> column = new ColumnConfig<MyModel, MyModel>(new IdentityValueProvider<MyModel>());
The ColumnConfig acts on a row of type MyModel, and the column wants access to that row directly, not a property in the row.