Refreshing Grid Toolbar

After Consulting the Documentation i came to the conclusion that the intended way of manipulating items in the toolbar is something like:

"grid.toolbarModule.toolbar.items[1].properties.disabled = true;"

and then to refresh the toolbar with

"grid.toolbarModule.toolbar.refresh();"

but using this approach causes the search to disappear. And makes Frozen toolbars disappear until you scroll.

As such my question is what is the intended way of manipulating items (enabling/disabling, changing text)in the toolbar, irrelevant of if they are Custom or built in Items.

In my search i also found: "grid.toolbarModule.refreshToolbarItems();" this Methode dosn't seem to do anyhing at least it doesn't persist the changes made to " grid.toolbarModule.toolbar.items"


In the Attached Sample i used both refreshes and show some of the flaws.


Attachment: Sample_acbcf42e.zip

1 Reply

JC Joseph Christ Nithin Issack Syncfusion Team December 7, 2023 10:37 PM UTC

Hi Chris,


  Greetings from Syncfusion support.


  Based on your query, you want to enable or disable the toolbar items, we have already discussed the same in the below documentation, please refer the documentation for more details.


  Documentation: https://ej2.syncfusion.com/aspnetmvc/documentation/grid/tool-bar/tool-bar#enable-or-disable-toolbar-items


Regards,

Joseph I.


Loader.
Up arrow icon