Emad Ahmed

Emad Ahmed

  • NA
  • 62
  • 3k

Multi Columns filtered gridview

Apr 15 2017 3:30 AM
  1. frmInnovationsGridView.InnovationsTable.Columns[17].HeaderText.ToString() + " = " + '1';  
I have a telerik RadGridView .
I have a filtere code that works like charm for only one column. What I need is that i want my code to filter 2 or 3  columns at the same time,
 
Here is my code:
 
  1. bs.DataSource = frmInnovationsGridView.InnovationsTable.DataSource;  
  2. bs.Filter = frmInnovationsGridView.InnovationsTable.Columns[25].HeaderText.ToString() + " = " + '1';  
  3. frmInnovationsGridView.InnovationsTable.DataSource = bs.DataSource;  
 I want to add another column filter as following;
 
  1. frmInnovationsGridView.InnovationsTable.Columns[17].HeaderText.ToString() + " = " + '1';  
 an a third column filter as following;
 
  1. frmInnovationsGridView.InnovationsTable.Columns[17].HeaderText.ToString() + " = " + int.Parse(EmployeeID.Text);  
 but EmployeeID.Text value will come from frmMain.Employee.Text
 
 
How can I do this
Thanks 

Answers (2)