datagrid question

A

Agnes

I would like to design the following control.
There are one main form & search form, the search form got one textbox and
one datagrid.

1) when user input the keyword in the textbox, datagrid will show the record
based on the keyword
2) as the user click any one of the row . the search form should return that
recordset/dataset to the main form
3) the main form will show the relevant data.

Now, I can Do the step 1) , however, I don't know how to do step 2 & step 3)

Thanks
 
C

Cor Ligthert

Hi Agnes,

First of all, never add a question to a question, that is not nice for later
use and also not for the one who did sent the message and thinks he get an
answer.

Than first a question, what is a control in your opinion, this are complete
forms the need for a control is reusability, it is never good to start to
make a control when you have not even make a form. However maybe you do mean
a form.

Your application will be very much dependable what database you use and what
are the search facilities from it.

The problem it self is very simple of course.
Make a textbox
Make a select statement confirming the text in the textbox and fill a
dataset
Bind that dataset to your datagrid using the datasource property
Let the user make a choise of a row
Make a select from the item you want to show a Where in that.
Read the item direct in a textbox in the database using
command.executeScalar

That is all.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top