How to update the checkbox value in the datagrid?

I

irene

Hi, I am trying to update the checkbox value in a datagrid. I am using
TemplateColumn to add the checkbox to the datagrid and it is showing
correct data from the database now. Ideally, the end user will check
the checkbox(if it is approved) and then there is a confirmation
button on the page. After them make the changes, they will hit the
confirmation button so that the database will be updated accordingly.
I am not using dataset at this point, I am just using regular
sqldatareader to get the result from the database and then bind to the
datagrid. But I do not know how to update the datagrid after that.

Can anyone give me an example how to do this?

Thanks.

Irene
 
S

Scott M.

You can't update the database with a DataReader. Pull in a copy of the data
into a DataSet and update the DataSet with the new column value. Then
update the db with a DataReader.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top