We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding Refresh Button To Toolbar

Thread ID:





113608 Oct 1,2013 06:50 PM UTC Oct 4,2013 12:39 PM UTC ASP.NET MVC (Classic) 1
Tags: Grid
Frank Carr
Asked On October 1, 2013 06:50 PM UTC

Do you have an example of how to add a refresh button, with a graphic, not text, to the Grid toolbar? The button should clear all filters/searches.
I suppose this could be done by reloading the entire partial view of the grid but since this seems to be built in on the paging bar I thought there might be a shortcut to doing this.

Sandhya D [Syncfusion]
Replied On October 4, 2013 12:39 PM UTC

Hi Frank,

Thanks for your interest in using  syncfusion Products.
Your requirement  to add the toolbar item with  refresh can be achieved by adding the item in ToolBar, In  ClientSideEvents using "onToolbarClickEvent" we can remove the filters and search options while refresh. Please refer the code below.


.Filtering(filter =>
                 .Caption("Product Details")
                        .PageSettings(page => { page.PageSize(5).PageCount(5); })
                        .Column(cols =>
                        cols.Add(c => c.Id).HeaderText(" ID");
                        cols.Add(c => c.Name).HeaderText("Name");
                        cols.Add(c => c.Description).HeaderText("Description");
                        cols.Add(c => c.Quantity).HeaderText("Quantity");


                 .ClientSideEvents(e => e.OnToolbarClickEvent("OnToolbarClickEvent"))

                 .ToolBar(tools =>
                    tools.Add("Refresh", "Refresh");


[script ]

<script type="text/javascript">
    var gridObj = null;
    function OnToolbarClickEvent(sender, args) {
        gridObj = sender;
        if ($(args._currentItem).children("a.Refresh").length > 0) {
            gridObj._filters = [];
            gridObj._searchResults = [];
        .Refresh {
            background-image: url("/Images/111.png");

We have attached sample for your reference.Please get back to us if you need further assistance.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon