How do you dynamically add checkboxes into a datagrid?

G

Guest

Hi,

I want to add a checkbox in a cell only if the value for that cell is a
"yes" (for instance) from a datasource. Otherwise, the cell would be blank.
Is this done from the ItemDataBound delegate? How?

Also, is it possible to replace that column with "yes" and "no" with
checkboxs and blanks. Or would I have to make that column visible=false and
just add a column to hold the dynamically created checkboxes?

And I would like this checkbox to postback as soon as someone checks it.
Any help is appreciated. Thanks!

Wayne
 
Z

Zürcher See

Look at the DataList component, and bind the property visible of the
checkbox with the datasource field
 

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

Top