datagrid + textboxes

J

John

Hello.

I display the results of an SQL query to a datagrid.
Then I am trying to bind the data of a datagrid to some txtboxes.
Let's say for example that when I select a row, I want the data of the
selected
row to be displayed in the appropriate text boxes.

What I did is the following:

1)Create a DataAdapter
2)Fill a DataSet object
3)Create a table and fill it from the dataset
4)Bind the txtboxes to specific columns of the table.

The problem is the following.
When the text boxes are in the same form as the datagrid, everything works
well.
However, when I tried to put the text boxes in a separate form, it didn't
work.
I tried to call the refresh method, but still nothing.

Am I missing something?

Thnx in advance,
John
 
K

Ken Tucker [MVP]

Hi,

The currency manager keeps the records in datagrid and textboxes
in sync. Unfortunately each form has its own currency manager. So even
thought the controls are bound to the same data they will not be kept in
sync automatically. You will have to keep the 2 currency managers positions
in sync via code.

Ken
 
J

John

Thnx for the tip.

Do you know any site where I can example of how to use the currency manager?


Thnx in advance,
John
 

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

Top