I am having a doubt that
whter dataset can updated directly from datagrid
(ie by making changes directly in the datagrid ).

9 Years
Discussion Span
Last Post by martonx

Yes, if you thougt about Datagridview.

You have to bind the dataset to the datagridview.


Welcome madhurimonica.

>I am having a doubt that whether a dataset can updated directly from datagrid.

DataGrid class instance represent the view/GUI and DataSet instance provides data (Model). So when you made changes in a cell of grid you chage the data of dataset.


Read post #3.

Once you modified the cell value of datagridview then a corresponding row of DataSet will be modified.

If you want to write these changes to database (update the table - database) - you have to use DataAdpater class.

Did you work out? If yes then post your code. Remember, source code must be surrounded with bb code tags.


adatapost>Did you work out? If yes then post your code.
madhurimonica>No,i never try it
adatapost>Great! I ..sum up; Do you ever wish to code?


i am new 2 vb.net.
i am working in a project which i have 2 submit wthin 2 days
so my next module include this part.
so i posted it.somehow i will learn it 2day itself &2mrw i will post the code.



I have a very little video tutorial. In this tutorial I bound a database (and of course a dataset) to a datagrid. This is a C# project, but I am too lazy to google for you a VB.Net example (and I don't want to make your work).
Don't disturb the C# code, because I used VS2008 graphical environment, so I wrote only 1 (yes ONE) line of code.

Here you are the link: http://rapidshare.com/files/212910735/Vizhazi.avi

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.