Data Grid and table binding

A

Andreas Schubert

Hello newsgroup,

i am not sure if i am asking at the right place. If not, please forgive me.
I want to bind a table to a datagrid and make it editable.
I know how to data bind and so, but I got trouble with the dataadapter.
at runtime, the user selects a table from a list. with "Select * FROM table"
I can show the content
of the table in the grid. but how do I make it updatable? I would have to
define a update command from the table. is there a way to generate such a
command or is there an alternative?

thanks for the help!

Andy
 
J

Joe

Hi Andy,

You can use SqlCommandBuilder to generate the Update command for the
dataadapter.

-Joe
 
A

Andreas Schubert

thank you for the quick answer Joe,

works like a charm.
But one question is popping up after trying out SQLCommandbuilder:
Documentation states that this is working for simple tables. Is there a way
to make it work with
joined tables?

thanks

Andy
 

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