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

Column Template change dataSource

1 Answer 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 20 Feb 2014, 08:45 PM
I have a Kendo Grid where and only one of the columns is editable and that column has a template.  The template is: 
  '<input type="text" class="grid-input" value="#=Percentage#" />'
where Percentage is the dataSource column name.

Since the text boxes are visible for all rows (desired L&F), how do I make sure any changes in those text boxes result in the dataSource being updated?

Thanks in advance,
--Ed

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 24 Feb 2014, 11:27 AM
Hello Ed,

Basically there are two ways to achieve this behavior:
  • Use MVVM to bind the textboxes to a certain column, as shown in this example
  • Attach change event handlers to the textboxes. Once the event is triggered get the dataItem and use the set method to update its properties

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Ed
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or