By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,414 Members | 1,024 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,414 IT Pros & Developers. It's quick & easy.

How to update the checkbox value in the datagrid?

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.
"irene" <xi*@proexam.org> wrote in message
news:72*************************@posting.google.co m...
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

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.