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

RadGrid filtering call custom storedprocedure

0 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prashanthi
Top achievements
Rank 1
Prashanthi asked on 26 Mar 2012, 08:46 PM

I want to call a storedprocedure when filtering happens in RadGrid , but it does not seem to be working. How do I override the default filering and bind to the data from the storedprocedure?

protected void RadGridMaster_ItemCommand(object source, GridCommandEventArgs e)
 {
     if (e.CommandName == RadGrid.FilterCommandName)
     {
         Pair filterPair = (Pair)e.CommandArgument;
         string filterPattern = ((TextBox)(e.Item as GridFilteringItem)[filterPair.Second.ToString()].Controls[0]).Text;
 
         //string filter = RadGridMaster.MasterTableView.FilterExpression;
         BindMasterGrid(filterPattern);
         (this.Page as BasePage).ClearAllControls();
     }
 }

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Prashanthi
Top achievements
Rank 1
Share this question
or