0

I have a RadGrid control. When I call RadGrid.Rebind() in its sorting/filter event handlers the data updates. When I call rebind() within a linkbutton outside the RadGrid, NeedDataSource is triggered and the datasource is changed appropriately but the RadGrid itself doesn't update the cell values with the new datasource. The only way I can get it to refresh is by manually refeshing the browser.

Does anybody have any ideas why this happens?

(Using Telerik AJAX Controls for .NET)

EDIT: My Linkbutton wasn't wrapped in a RadAjaxPanel. I have now put this in the markup around the RadGrid and the linkbutton. Nothing is happening..I don;t see how this will change things..surely I have to do something with this RadAjaxPanel?

user559142
  • 12,279
  • 49
  • 116
  • 179

2 Answers2

2

Are the controls all wrapped in a RadAjaxPanel, or does the LinkButton update the RadGrid if you are using RadAjaxManager?

If you wrap the grid and the linkbutton in a RadAjaxPanel it should work.

KRichardson
  • 990
  • 7
  • 12
  • Could you be a little mor especific...I have wrapped the link button and the grid in RadAjaxPanels in markup....do I have to do anything else? – user559142 Apr 16 '12 at 18:52
  • Are they in the same radajaxpanel? – KRichardson Apr 16 '12 at 19:34
  • no that isn't a possibility. the link button is an asp:content tag and must go at the top of markup. – user559142 Apr 16 '12 at 20:11
  • Then you would need to add a RadAjaxManager that allows the one ajaxpanel to update the other ajaxpanel (one with link can update the one with the grid). For example - http://www.telerik.com/help/aspnet-ajax/ajax-controls-in-ajaxpanel-and-ajaxsettings.html – KRichardson Apr 16 '12 at 20:15
  • I ended up using a RadManagerProxy as I had a RadManager already defined in a parent aspx page. Your answer led me to the wprking solution. Cheers! – user559142 Apr 19 '12 at 20:27
2

If you're using a RadAjaxPanel or the RadAjaxManager, you'll need to make sure that the LinkButton is either in a RadAjaxPanel or defined as a setting in the manager, with the RadGrid as one of the UpdatedControls.

James Johnson
  • 45,496
  • 8
  • 73
  • 110