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

Refresh RadGrid client object on postback

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Dmitry asked on 30 Nov 2011, 09:02 AM
Hello,
I initiate a postback with __doPostback function and pass some data which should help to set a VERY custom filter on dataset. But when page is reloaded, I can see that grid client object was not refreshed and all data and AJAX cell controls was the same as before. Grid is in ASP.NET panel which is under RadAjaxManager control. Is there a way to fully reload grid client object on postback?
Thank you.

UPD. Almost forgot - grid is created programmatically in Page_Init method.

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 02 Dec 2011, 04:24 PM
Hi Dmitry,

If you are performing postback the RadGrid should be reloaded by default and it seems there could be something incorrect in your logic on the server. Try using ajaxRequest instead of _doPostBack function. Here is the needed approach:
JS:
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
 ajaxManager.ajaxRequest();

C#:
protected void RadAjaxManager1_AjaxRequest1(object sender, AjaxRequestEventArgs e)
   {
    //Do the action here
   }


I hope this helps.

Regards,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or