Rebind grid after a RadWindow Popup

We just wrote an article about how to code a popup window from a RadGrid. This article shows how to rebind the grid when the window closes. 

 

In the asp code

function OnClientClose(){
    $find("<%= RadAjaxPanel1.ClientID %>").ajaxRequest();
}
<telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" runat="server">
    <Windows>
        <telerik:RadWindow RenderMode="Lightweight" ID="AddBaseDialog" runat="server" Title="Add Base Quantity (Each, Sample)" Height="300px" OnClientClose="OnClientClose"
            Width="500px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"  VisibleStatusbar="false"
            Modal="true">
        </telerik:RadWindow>
    </Windows>

In the Code Behind

Private Sub RadAjaxPanel1_AjaxRequest(sender As Object, e As AjaxRequestEventArgs) Handles RadAjaxPanel1.AjaxRequest
    RadGrid1.MasterTableView.SortExpressions.Clear()
    RadGrid1.MasterTableView.GroupByExpressions.Clear()
    RadGrid1.Rebind()
End Sub

RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences