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

Default select the record which has been added

1 Answer 29 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rahul Masurekar
Top achievements
Rank 1
Rahul Masurekar asked on 14 Jan 2014, 02:48 AM
Hi
If we add any record, after save it should by default select the
record which has been added if it exists in the grid.
How do we achieve this in Kendo?



1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 15 Jan 2014, 11:44 AM
Hi Rahul,

There is not a built-in functionality that covers your requirement. You can use the dataBound event of the Grid, so every time the Grid is bound to the new data, you can select the first row of the grid, as the new item is placed there. The problem comes from the fact that you need to know if a new item is added or and existent one was edited, so you can use the edit event to set a global flag that will tell you if the item is new or not. Please check this example I made for a possible implementation:

http://jsbin.com/UcIVuMo/1

Regards,
Kiril Nikolov
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
Rahul Masurekar
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or