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

Label not updating on RadGrid refresh

2 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lukas
Top achievements
Rank 1
Lukas asked on 30 Jun 2015, 02:33 PM

Hello,

I currently have a page with a RadGrid and a label which tells the last time that the RadGrid was refreshed. The RadGrid has a refresh command item, and the problem is that pressing the refresh button refreshes the RadGrid but does not update the label. In the RadGrid's PreRender event I have included the following code:

 

RefreshLabel.Text = "Last Refreshed: " + System.DateTime.Now.ToString();

 

 

The text of the label changes when I manually refresh the page, but not when I press the RadGrid's refresh button. Is there some quirk to RadGrid's which would prevent the text of the label from changing? Or is there some other event that I should put this code in? I have tried putting the same code in the RadGrid's NeedDataSource event as well, to no avail. 

 

Thank you for any help that can be provided.

 

2 Answers, 1 is accepted

Sort by
0
Lukas
Top achievements
Rank 1
answered on 30 Jun 2015, 02:45 PM
As a follow-up, the RadGrid is hooked up to an AJAX Manager. Upon disabling AJAX the label text updates along with the RadGrid as desired. Is there something I must do with the label to have it update with the RadGrid when AJAX is enabled?
0
Lukas
Top achievements
Rank 1
answered on 30 Jun 2015, 03:03 PM
After recognizing that the problem was due to AJAX I was able to solve this issue. 
Tags
Grid
Asked by
Lukas
Top achievements
Rank 1
Answers by
Lukas
Top achievements
Rank 1
Share this question
or