How do you dynamically add checkboxes into a datagrid?

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Look at the DataList component, and bind the property visible of the
checkbox with the datasource field
 
Back
Top