This is a migrated thread and some comments may be shown as answers.

rebind data RadGrid inside radwindow on close

2 Answers 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sanji
Top achievements
Rank 1
Sanji asked on 14 Apr 2020, 11:44 AM

Hii all,

 

i have radGrid inside RadWindow, when radwindow close i want to rebind and clear filter data radGrid on client side,

i use this code but not work.

function RebindGrid() {
        var masterTable = $find("<%= RgDataEmployee.ClientID %>").get_masterTableView();
        masterTable.get_filterExpressions().clear();
        masterTable.rebind();
}

2 Answers, 1 is accepted

Sort by
0
Accepted
Doncho
Telerik team
answered on 15 Apr 2020, 03:42 PM

Hi Sanji,

In order to clear the filters, try using the clearFilter() method in the OnClientClose event handler of the RadWindow, see clearFilter.

function clientClose(sender, args) {
    var grid = $find("<%= RadGrid1.ClientID %>");
    var masterTable = grid.get_masterTableView();
    masterTable.clearFilter();
}

For rebinding the RadGrid on client-side you can use the rebind() method. Check out the rebind client method article.

Depending on what binding technique is used for binding data to the RadGrid you might need to implement some additional logic. You can check out the RadGrid: Clear filter at client - side forum post. 

I hope that will help you solve the issue.

 

Kind regards,
Doncho
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Sanji
Top achievements
Rank 1
answered on 17 Apr 2020, 07:38 AM

hi,

 

Thank for your reply, and that script work.

 

Sanji.

Tags
Grid
Asked by
Sanji
Top achievements
Rank 1
Answers by
Doncho
Telerik team
Sanji
Top achievements
Rank 1
Share this question
or