Click here to Skip to main content
15,899,935 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm dynamically adding a Boolean column to a Datatable. The datatable is the DataSource for a GridView

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


dt.column.add("check",typeof(Boolean));
dt.column["check"].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?)

how to make the gridview column not readonly?


Thanks
Posted
Updated 1-Dec-09 22:20pm
v2

This is a repost of this previous question.

That is just the data behind the GridView. You need to modify the GridView column to not be readonly (i.e., in the above code you are modifying the DataTable column, which you should not be doing).
 
Share this answer
 
Let Me Google That For You: Second and Third Results

Next time, Google it yourself.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900