checkbox bind with 0 = checked?

M

Maarten

I have a bound-checkbox. The database value = 0 but the checkbox got
checked?
Why is that?
What value should be in the database for being not checked then?


tia
 
S

Scott M.

[VB.NET]

0 = False
-1 (or any non-zero value = True)

If you are getting a checked checkbox, I would look into the possibility
that the actual field data you are using to control it isn't what you think
it is.
 
M

Maarten

How can I check that the best then?
(besides running the stored procedure in SQL server and see that 0 is
returned for that (whole)column?)
Can I debug/see what the databinding presents as value?

thank you

Scott M. said:
[VB.NET]

0 = False
-1 (or any non-zero value = True)

If you are getting a checked checkbox, I would look into the possibility
that the actual field data you are using to control it isn't what you
think it is.


Maarten said:
I have a bound-checkbox. The database value = 0 but the checkbox got
checked?
Why is that?
What value should be in the database for being not checked then?


tia
 
S

sirfunusa

Run the stored procedure. And whole column? Is this a grid with a
checkbox column?

Set breakpoints on ItemDataBind, ItemCreated, etc.
 
M

Maarten

I am sorry!!
You where right the first time.
Stupid me!! looking at the wrong column (SQL) the last couple of hours!!!

Again sorry for wasting your time.
Problem fixed.

Many thanks for your effort

Regards,
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top