Setting a checkbox based on a value in a DB

C

C

Hi,

Based on a flag in my database table I want to make a
server side checkbox checked.

How can I dynamically do this through code?

Thanks,
C
 
A

alien2_51

Not sure what your looking for.....
If your using data binding with a datagrid...
in a windows application this is automatic, you have to do nothing...
in a web app you get "True" or "False" in the grid, you have to use a
TemplateColumn in combination with ItemCreated event to set the checked
proerty of the check box control to the value coming from the database.
If your not using databinding
what are you using......?
datareader..?
dataset..?
datatable..?
xml...?
 
M

MS News \(MS ILM\)

mycheckbox.Checked = true or false depending on the value you get form you
database
 

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,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top