I have a client requirement to show a status field if a filter is applied to the RadGrid. To get the status I am basically checking to see if the FilterExpression has a .length >0 and then updating a ASP:LITERAL with the value. Here is the code:
My question is, what event(s) should I be attaching my code to in order to keep that status current? And, should this code be server-side or client-side (I have versions of both)
I have tried on the Grid.PreRender, which of course fails because it hasn't bound any columns or processed any filters. I have also tried this on pageLoad (client side) and it fails there too. I have tried ItemBound, ColumnCreated and none seem to provide the proper timing to show the status. I also tried to inject a client-side script on the AjaxRequest of my AjaxManager but the event never seemed to fire.
Anyone else have any thoughts, or should I just be pushing back to my customer?
Thanks
-Matt
// determin filter status and update UI
bool
b = RadGrid1.MasterTableView.FilterExpression.Length > 0;
string
status =
string
.Format(
"Filtered: {0}"
, b.ToString(CultureInfo.InvariantCulture));
this
.ltrfilterStatus.Text = status;
My question is, what event(s) should I be attaching my code to in order to keep that status current? And, should this code be server-side or client-side (I have versions of both)
I have tried on the Grid.PreRender, which of course fails because it hasn't bound any columns or processed any filters. I have also tried this on pageLoad (client side) and it fails there too. I have tried ItemBound, ColumnCreated and none seem to provide the proper timing to show the status. I also tried to inject a client-side script on the AjaxRequest of my AjaxManager but the event never seemed to fire.
Anyone else have any thoughts, or should I just be pushing back to my customer?
Thanks
-Matt