DataGrid, DataSet, GetChanges question

M

Marty

In winforms, I can bind a datagrid to a dataset. When the user wants to
submit changes, it's easy to see what has changed with the DataSet
"GetChanges" method.

In ASP.Net, I can create the dataset, bind it to the grid, then send to
the user. But upon postback, I have no way of knowing which items
changed on the datagrid. Do I really have to roll my own code for this
or is it possible to use the GetChanges method on the dataset after
all? Thanks --Marty
 
E

Elton Wang

Hi Marty,

Due to client-server mode, a web application can't tightly
bind a datagrid with its underlying data source. Hence
once postback, you need to get data from datagrid itself,
e.g. datagrid.Items[rowIndex].Cells[colIndex].Text. There
is no way to use GetChanges on it's underlying dataset.

HTH

Elton Wang
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top