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

Recommended Answers

All 10 Replies

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.

In a nutshell, please find some ebooks, or check MSDN for examples.

can i get the code fr updating from datagridview

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.

How can you manage this? Forum is medium where you can find the solution of some extent.

Hello,

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.