Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi. In the winform i have datagridview which includes ID column and StudentName column. i want to know how can i do this : i want to when i click on column and type a name it will automatically search the value that i want to search it. and when i found the name the datagridview just show me that founded row.
Any help will be appreciated.
Thanks in advance
Posted

1 solution

private void customerNameTextBox_TextChanged(object sender, EventArgs e)
{
orderAdvancePaymentViewBindingSource.Filter = "CustomerName like '" + customerNameTextBox.Text + "%'";

}
private void column_TextChanged(object sender, EventArgs e)
{
orderAdvancePaymentViewBindingSource.Filter = "Id like '" + customerNameTextBox.Text + "%'";

}
 
Share this answer
 
Comments
aliprogrammer 8-May-12 11:06am    
what are customerNameTextBox and column_TextChanged?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900