DataGrid DataColumn Property Set at Run-time
I have a windows application that uses a datagrid to display three fields from a sql server 2000 database table. Two of the fields are character fields, with a length of 1, that are translated as boolean columns in the datagrid. Is there a way to disable the second boolean field based on the value of the first boolean field? I am assuming this would mean setting the column property to ReadOnly at run-time. I don't want to allow the user to change the value of the second boolean field unless the first boolean field is false, or unchecked.
Also, is there a way to disable the NullValue setting so that they can only select true or false? My sql table fields do not allow nulls.
Any advice would be greatly appreciated.
|