See inline:
"weird0" <am********@gmail.comwrote in message
news:11*********************@57g2000hsv.googlegrou ps.com...
How can i update the data in my database directly through
datagridview....? Can anyone tell me the appropriate links and what is
the exact event in datagridview that handles it and some explanation
abut how to handle it.
You can't do it. Assuming you are bound to a DataSet/DataTable, at the
point you want to update the database (that's up to you to decide when), you
have to pass the changed DataSet/DataTable through a data adapter,
performing the update yourself.
what does ds.Tables[0]...ds.Tables[string name] return by the way?
What does it mean?
Assuming ds is a DataSet, ds.Tables[0] will return the first DataTable
instance that the DataSet stores. The call to the string indexer on the
Tables will return the DataTable with that name.
DatagridView.DataSource=ds.Tables[0]; // one of the statement in my
code Why?
I don't know what you mean by this.
What is a DAtaSet and DataAdapter? Some links plz.
A DataSet is a set of DataTables, along with any relations
(DataRelation) between those tables. It is an in-memory representation of
data.
A DataAdapter will take a DataSet/DataTable and based on the changes
made to it, iterate through the changes and execute a command against the
underlying data source for each change in the DataTable.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com