|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Data Grid and table bindingHello 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 Hi Andy,
You can use SqlCommandBuilder to generate the Update command for the dataadapter. -Joe Show quote "Andreas Schubert" <anwendungsprogrammierer.RemoveSpam@web.de> wrote in message news:OvKSyMr7FHA.3048@TK2MSFTNGP10.phx.gbl... > 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 > Joe wrote:
> Hi Andy, Maybe you should read:> > You can use SqlCommandBuilder to generate the Update command for the > dataadapter. http://msdn.microsoft.com/vbasic/default.aspx?pull=/library/en-us/dnvs05/html/newdtastvs05.asp Or you can forget about datasets and use http://www.nhibernate.org ;) Show quote > > -Joe > > "Andreas Schubert" <anwendungsprogrammierer.RemoveSpam@web.de> wrote in > message news:OvKSyMr7FHA.3048@TK2MSFTNGP10.phx.gbl... > >>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 >> > > > 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 Show quote "Joe" <jbassking@noemail.noemail> schrieb im Newsbeitrag news:OV0KrQr7FHA.1416@TK2MSFTNGP09.phx.gbl... > Hi Andy, > > You can use SqlCommandBuilder to generate the Update command for the > dataadapter. > > -Joe > > "Andreas Schubert" <anwendungsprogrammierer.RemoveSpam@web.de> wrote in > message news:OvKSyMr7FHA.3048@TK2MSFTNGP10.phx.gbl... >> 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 >> > > |
|||||||||||||||||||||||