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

fire needdatasource in update panel

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Łukasz Kuryło
Top achievements
Rank 1
Łukasz Kuryło asked on 21 Jun 2010, 11:47 AM
Hi all.
In radgrid, after some operation on client side I want to refresh the grid, so I use __doPostBack(gridid). Update panel is refreshing, but only Page_Load is fired, not needdatasource event. How can I refresh the update panel and refresh the data in grid?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Jun 2010, 02:00 PM
Hello,

If you are using AjaxPanel, then you can invoke an ajaxRequest() from client side and call the Rebind() method from code behind in AjaxRequest server event.

client code:
 
function InitiateAjaxRequest(arguments) 
  // your code 
  var ajaxPanel = $find("<%= RadAjaxPanel1.ClientID %>"); 
  ajaxPanel.ajaxRequest(arguments); 

code behind:
 
    protected void RadAjaxPanel1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) 
    { 
       // rebind the grid here 
    } 


-Shinu.
Tags
Grid
Asked by
Łukasz Kuryło
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or