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

[Solved] Use Calendar to set selected row in Grid

1 Answer 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James
Top achievements
Rank 1
James asked on 16 Aug 2012, 03:11 PM
How do I set the selected row and move it to the center of the Grid when I selected a data in the Calendar?  Each row in the grid has a date column.  Instead of scrolling through multiple years of records, I want to use the Calendar to bring the selected date into view.

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 21 Aug 2012, 02:27 PM
Hi James,

Thank you for contacting us.

Scrolling to a position in the Grid by custom field value is not supported out-of-the-box. However, I have prepared a small example project, how to achieve this (please find attached project):
Here are the main steps:
  • Attach a handler to the "change" event of the Calendar - this.value() is the selected date
  • Iterate through the tr elements in the Grid to find that row (with the help of the dataItem)
  • When the first element is found, we set the scroll position to that element position


Kind Regards,
Vladimir Iliev
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or