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

RadGrid server-side filter event?

1 Answer 633 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeremy Yoder
Top achievements
Rank 1
Jeremy Yoder asked on 27 Nov 2013, 10:53 PM

My parent grid updates 2 children grids on the page via RadAjaxManager when I click a different row, by having EnablePostBackOnRowClick set to True. I need to empty the children grids when I sort, change pages, or filter (given the selected row may no longer be visible) hereby requiring the user to select a new row to update the 2 children grids.

I have it working for sorting and changing pages (by calling .Rebind() with empty datasets) on the server-side within the parent grid's SortCommand and PageIndexChanged events. However, I can't find a server-side event to call when the user changes any column filters. How can I do this?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 Nov 2013, 10:18 AM
Hi Jeremy Yoder ,

You can use the Filter CommandName to identify the filter event being raised. The ItemCommand event is fired on filter and hence it can be used to perform your required operations.

C#:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
 {
   if (e.CommandName == RadGrid.FilterCommandName) //FilterCommandName is raised when filtered
   {
      //Your Code
   }
 }

Thanks,
Princy
Tags
Grid
Asked by
Jeremy Yoder
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or