Checkboxes in a Datagrid problem

R

REB

I have a datagrid that retrieves 3 fields per record row from a SQL server
2000 database table, the data it retrieves looks like this:

Violation Notice Date Type of Violation
<True/False> 3/1/03 Speeding
<True/False> 2/10/04 Ran a stop light

The <True/False> is a checkbox and signifies that we have received the
paperwork for the violation. Now onto my problems. First off I changed the
first column to a templated column and put in a checkbox and set its
databind text and checked propety to use the correct column from the data
source (source is a SQL bit column that only contains a 0 or a 1). This
worked, but only for the first row in the grid, each additional row would
show the same exact value from the first row. For example, I had 3 records
and if the first one had a value of true all of them showed true even though
I verified that some were false. If I changed the first row to a false
value in SQL table then all rows show false.

My second problem is when a checkbox is changed (CheckChanged event) I want
to save the bit value back to the database so records can be updated right
from the datagrid. How can I do this? Can someone help me out?

Thanks alot,
REB
 
R

REB

I discovered my error as to why I was getting repeating values from the
checkbox, but still need some help on how to make a CheckChanged event for
the checkbox in the datagrid so it will save to the database?

Thanks,
REB
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top