I am trying to put a textbox as an Rowfilter under a textchanged event !
The code below is used to GRID to get the appropriate Reg_Number
or Customer_Name
which is entered in the text box!
wat's the surprising fact is, this code directly takes the 2nd Argument
(i.e)
((DataTable)radGridView1.DataSource).DefaultView.RowFilter = "Reg_Number like '%" + radTextBoxControl1.Text + "%'";
tried to switch the lines, but no matter what i did, it ignores the 1st one and takes the 2nd
i tried to put AND to get both in a single line, bt din't work, plz hel me frnzz!
private void radTextBoxControl1_TextChanged(object sender, EventArgs e)
{
try
{
((DataTable)radGridView1.DataSource).DefaultView.RowFilter =
"Customer_Name like '%" + radTextBoxControl1.Text + "%'";
((DataTable)radGridView1.DataSource).DefaultView.RowFilter =
"Reg_Number like '%" + radTextBoxControl1.Text + "%'";
}
catch (Exception) { }
}