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

Initiate Ajax Event

2 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Omlac
Top achievements
Rank 1
Omlac asked on 22 Oct 2008, 12:41 PM
How do i initiate an ajax event, i would like to reload/rebind the grid after every save function on a page, the code below shows what i have done so far but i think im missing the final part of initing the event that trigers AJax Reload.

 

Html Code

 

<

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
   <telerik:AjaxSetting AjaxControlID="rdgContacts">
          <UpdatedControls>
                 <telerik:AjaxUpdatedControl ControlID="rdgContacts"/>
         </UpdatedControls>
    </telerik:AjaxSetting>
  </AjaxSettings>
</telerik:RadAjaxManager>

Code behind
protected

protected

 

void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
rdgContacts.Rebind();
}

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 22 Oct 2008, 01:12 PM
Hello Omlac,

You can call rebind() client-side method for the GridTableView client-side object:

$find("<%= rdgContacts.ClientID %>").get_masterTableView().rebind();

Since the grid is already ajaxified you will get ajax request instead post-back to the server.

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Omlac
Top achievements
Rank 1
answered on 22 Oct 2008, 01:37 PM
thank you very much
Tags
Grid
Asked by
Omlac
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Omlac
Top achievements
Rank 1
Share this question
or