Hi Salik,
Thanks for contacting Syncfusion support.
Based on your requirement, you need to update the textbox value in the selected rows in the Grid.
You can achieve your requirement by using updateRow method. Find the below code example and sample for more information.
|
btnclick(args) {
// get the input value from textbox
var value = parseInt((document.getElementById("amtvalue") as any).value);
// get the selected rows index
var index = this.grid.getSelectedRowIndexes();
// get the selected records
var records = this.grid.getSelectedRecords();
for (var i = 0; i < index.length; i++) {
// change the input value in selected record
records[i]["amount"] = value;
// update the value in Grid
this.grid.updateRow(index[i], records[i]);
}
} |
In the external button click, we get the selected records in the Grid and update the amount value in the selected rows by using updateRow() method.
Note: Editing feature requires a primary key column for CRUD operations. To define the primary key, set
columns.isPrimaryKey to
true in particular column.
Please get back to us if you need further assistance with this.
Regards,
Rajapandiyan S