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

filtering based on conditions

1 Answer 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Allen
Top achievements
Rank 1
Allen asked on 07 Oct 2013, 11:53 AM

 Hi,
     How can I show or hide filtering item based on some conditions?

 Somebody please help me out. Would appreciate immediate help.

thanks in advance,
Allen

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Oct 2013, 12:03 PM
Hi,

I guess you want to hide the Filter item of a column based on a condition. Here I am cross checking with the UniqueName of the column and hiding its filtering item.

C#:
private void RadGrid1_ColumnCreated(object sender, Telerik.WebControls.GridColumnCreatedEventArgs e)
{
  if(e.Column.UniqueName == "ColumnUniqueName") // place here your column unique name
  {
   GridBoundColumn boundColumn = e.Column as GridBoundColumn;
   boundColumn.AllowFiltering= false;
  }
}

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