I want to set the restriction during runtime for my queries in DatagridView. can anyone help me.
Printable View
I want to set the restriction during runtime for my queries in DatagridView. can anyone help me.
Thread moved from VB 6 Forum to the VB.NET Forum
I'm afraid that you'll need to provide us with more details on what you're trying to achieve. We're not mind readers :)
What I really want to do is I want to generate data to the DataGridView based on what I type into the Textbox. for example, I want to see all the record of the employee whos employee no. is 10066.
You'd use a bindingSource and set the bindingSource.DataSource = your datatable, then set the datagridview.datasource = the bindingSource. Now handle one of the textbox event such as keypress and set the bindingSource.Filter = "employeeNumber = '" & textbox.text & "'". Since your question is very general and no source code was shown, I can't really provide the exact code.