PC Review


Reply
Thread Tools Rate Thread

Data Grid and table binding

 
 
Andreas Schubert
Guest
Posts: n/a
 
      21st Nov 2005
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


 
Reply With Quote
 
 
 
 
Joe
Guest
Posts: n/a
 
      21st Nov 2005
Hi Andy,

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

-Joe

"Andreas Schubert" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
luxspes
Guest
Posts: n/a
 
      22nd Nov 2005
Joe wrote:
> Hi Andy,
>
> You can use SqlCommandBuilder to generate the Update command for the
> dataadapter.

Maybe you should read:
http://msdn.microsoft.com/vbasic/def...wdtastvs05.asp
Or you can forget about datasets and use http://www.nhibernate.org

>
> -Joe
>
> "Andreas Schubert" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
>
>>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
>>

>
>
>

 
Reply With Quote
 
Andreas Schubert
Guest
Posts: n/a
 
      22nd Nov 2005
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

"Joe" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> Hi Andy,
>
> You can use SqlCommandBuilder to generate the Update command for the
> dataadapter.
>
> -Joe
>
> "Andreas Schubert" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding multiple table to a Data Grid Nita Raju Microsoft ASP .NET 1 9th Dec 2004 10:44 AM
Binding Image to Field in Data Grid Simon Harris Microsoft ASP .NET 3 29th May 2004 04:20 PM
Data Grid Data Binding =?Utf-8?B?UGF1bG8=?= Microsoft ASP .NET 1 30th Mar 2004 03:47 PM
Binding an array of objects to Data Grid Abhishek Srivastava Microsoft ASP .NET 5 9th Mar 2004 06:25 AM
Custom Data Binding to Grid and TableStyles sandman Microsoft C# .NET 2 9th Feb 2004 06:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:30 AM.