Query about Data Grid and binding to controls

simran

Member
Joined
Jul 7, 2006
Messages
8
Programming Experience
Beginner
Hi Friends,

I a planning to add data grid in my project. If I use it then it will display all the records from the table. But my problem is something different.

Actually, I want to add textbox, button & datagrid in a form. So that when user writes student ID in textbox & click on search button then only those records that are related to that student ID must be displayed in data grid. I don't want to display all records in data grid.

Is there any solution to this problem. Please help me in ths matter. I shall be very grateful to you.

Thanks



(SIMRANJIT SINGH)
 
This isn't so much a query about a datagrid as it is one about ADO.Net. What you are asking is reasonably straightforward if you have experience with ADO.Net. If you havent then i suggest googling for a few tutorials.
Suffice to say that you will need some knowledge on the following topics..

SQL
OleDbDataAdapter
OleDbConnection
Setting the DataSource Of a DataGrid
DataTable's
Dataset's

It is advisable to have a go before you post, from what you have said it would seem like you haven't tried yet. Post with specifics about your current problem and it will most likely get answered. Don't just ask for us to do the work for you. Have a go, if you get stuck, then ask.
 
Back
Top