This is a migrated thread and some comments may be shown as answers.

Batch Edit Grid

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 04 Sep 2018, 01:33 PM
I have a grid used for batch editing.  There are only two editable fields in the grid(ImageStatus and Description).  When changing the radio button in a specific cell I am opening a window to gather additional data for the row that is in the model but not in the grid.  
FollowUp, Comment and FollowUpDate are in the model but not in the grid.
When closing the window I want to update the model data for the row so that when I save the grid, the additional data saves with it.
How do I get the data collected in the window back to the model data for the row so it will update when I save the grid?

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 06 Sep 2018, 11:47 AM
Hi, Bill,

There are different ways that you can accomplish the desired outcome.

With the current structure, you could pass the model ActivityId to the click handlers with the help of the Kendo Template syntax:

 
 <button class="k-button k-primary" onclick=onCancelClick(#=ActivityId#)>Test</button>
 
function onCancelClick(id){
  var grid = $("#grid").data("kendoGrid");
  var dataItem = grid.dataSource.get(id);
  console.log(dataItem);
}

Then using the data source get() method, you can get hold of the full dataItem and set() its properties as required:

https://dojo.telerik.com/@bubblemaster/aGIPUcik

Let me know if you need further assistance.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Get quickly and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Bill
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or