Hi,
I have a Kendo Grid and its first column is a Datetime and Its a Kendo DatePicker.
When the user click on Add new record button then the 1st cell which is a date picker should be auto focus.
Note: When the user click on Add new record button then we are sorting the grid in ascending order so that the new row should appear on the top, which is working fine but the 1st cell of the newly created row a Kendo Date picker in not in focus.
But when the user click on the first cell of the newly created row, then it opens the datepicker to allow user to select a date.
My requirement is when i am clicking the Add new record button then
1. It should sort in ascending order (Which is working now)
2. The 1st cell of the Kendo Datepicker should auto focus like the above screenshot.
.ToolBar(toolbar => { toolbar.Create().HtmlAttributes(new { onclick = "SortGridAscending();" }); })
function SortGridAscending(){ var grid = $("#TLPCurveAllocationsGrid").data("kendoGrid"); //sort Grid's dataSource grid.dataSource.sort({field: "AllocationDate", dir: "asc"}); }