Dynamically Added CheckBox Column is Disabled in GridView

Posted by Mark Maslar on Stack Overflow See other posts from Stack Overflow or by Mark Maslar
Published on 2009-05-06T20:03:47Z Indexed on 2010/04/02 2:03 UTC
Read the original article Hit count: 392

Filed under:
|
|
|

I'm dynamically adding a Boolean column to a DataSet. The DataSet's table is the DataSource for a GridView, which AutoGenerates the columns.

Issue: The checkboxes for this dynamically generated column are all disabled. How can I enable them?

ds.Tables["Transactions"].Columns.Add("Retry", typeof(System.Boolean));
ds.Tables["Transactions"].Columns["Retry"].ReadOnly = false;

In other words, how can I control how GridView generates the CheckBoxes for a Boolean field? (And why does setting ReadOnly to False have no effect?)

Thanks!

© Stack Overflow or respective owner

Related posts about c#

Related posts about dataset