Hello guys,
I need this functionality (https://demos.telerik.com/kendo-ui/grid/persist-state) but there are some problems.
I want to clarify one thing:
- You have a grid (you may check your own link - https://demos.telerik.com/aspnet-mvc/grid/editing-popup)
- In console I write:
and suddenly the toolbar breaks down.
I've checked a javascript version (https://demos.telerik.com/kendo-ui/grid/editing-popup) and everything is fine over there.
Let's check how "grid.options.toolbar" looks like:
JS:
So, it seems as "grid.options.toolbar" is useless when we talk about "MVC Wrappers".
The most important part - https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-setOptions
Yes, I see this note "When using the Grid MVC wrapper, any server templates will not be retrieved by the getOptions", but what can be counted as a "server template" talking about "toolbar"? If I use Kendo MVC, then everything or only when I use this one ".ToolBar(s => s.Template("<a random template>"))"?
So should I use what's described in this link?
https://github.com/telerik/ui-for-aspnet-mvc-examples/blob/master/grid/grid-preserve-server-toolbar-template-after-set-options/GridPerserveToolbarServerTemplate/Views/Home/Index.cshtml
Thank you for your time and sorry, probably I'm not the first who's asked it
Have a nice day
I need this functionality (https://demos.telerik.com/kendo-ui/grid/persist-state) but there are some problems.
I want to clarify one thing:
- You have a grid (you may check your own link - https://demos.telerik.com/aspnet-mvc/grid/editing-popup)
- In console I write:
var grid = $(".k-grid").data("kendoGrid");
grid.setOptions(grid.getOptions())"
I've checked a javascript version (https://demos.telerik.com/kendo-ui/grid/editing-popup) and everything is fine over there.
Let's check how "grid.options.toolbar" looks like:
JS:
{name: "create"}{name: "save"}{name: "cancel"}
MVC:
{ command: { { name: null, buttonType: "ImageAndText", text: "create"}, ...
The most important part - https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-setOptions
Yes, I see this note "When using the Grid MVC wrapper, any server templates will not be retrieved by the getOptions", but what can be counted as a "server template" talking about "toolbar"? If I use Kendo MVC, then everything or only when I use this one ".ToolBar(s => s.Template("<a random template>"))"?
So should I use what's described in this link?
https://github.com/telerik/ui-for-aspnet-mvc-examples/blob/master/grid/grid-preserve-server-toolbar-template-after-set-options/GridPerserveToolbarServerTemplate/Views/Home/Index.cshtml
Thank you for your time and sorry, probably I'm not the first who's asked it
Have a nice day