Is there any way to select the inserted row after saving a popup edit?
This is my grid:
I have tried the following, which selects the row but immediately deselects it (as if the grid refreshes?):
This is my grid:
01.@(Html.Kendo().Grid<Receipt>()02. .Name("GridReceipts")03. .Columns(columns => {04. columns.Bound(o => o.ReceiptId);05. columns.Bound(o => o.Status);06. columns.Command(c => {07. c.Edit().Text(" ");08. c.Destroy().Text(" ");09. });10. })11. .DataSource(d => d12. .WebApi()13. .Model(m => {14. m.Id(o => o.ReceiptId);15. })16. .Create(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts" })))17. .Read(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts" })))18. .Update(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts", id = "{0}" })))19. .Destroy(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts", id = "{0}" })))20. )21. .Pageable(p => p22. .Refresh(true)23. .PageSizes(true)24. .ButtonCount(5)25. )26. .ToolBar(toolbar => toolbar.Create())27. .Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("Receipt"))28. .Sortable(s => s.AllowUnsort(true))29. .Selectable()30. .Deferred()31.)I have tried the following, which selects the row but immediately deselects it (as if the grid refreshes?):
1.function saveReceipts(e) {2. var grid = $("#GridReceipts").data("kendoGrid");3. var dataItem = grid.dataSource.get(e.model.ReceiptId);4. var row = grid.tbody.find("tr[data-uid='" + dataItem.uid + "']");5. 6. grid.select(row);7.}