Home All Groups Group Topic Archive Search About

Disable Datagrid Cell Based On Initial Value

Author
17 Jan 2006 10:43 PM
mkrei
I have datagrid that I format at runtime with tablestyles and adding
columns.  I have a DataGridBoolColumn that I have subclassed, but can't
get the right result.  I want to disable a cell based on the initial
value of that checkbox.  If the initial value is checked, I want it to
be disable where the user can't change it.  If the intial value is not
checked, then the user can select and deselect the checkbox.  When the
datagrid is first rendered, a row with a value of 1 will be checked and
will be disabled, but the problem I am having is that when I check one
of the other checkboxes for another row, they to become disabled and I
cannot uncheck them.  I have been working on this for days with no
luck.  Any help would be appreciated.

Author
18 Jan 2006 2:11 AM
Ken Tucker [MVP]
Hi,

http://www.vb-tips.com/default.aspx?ID=121c8d27-6df9-4193-8f80-0bb1f5217419

Ken
-----------------
<mk***@yahoo.com> wrote in message
Show quoteHide quote
news:1137537808.232756.166930@g47g2000cwa.googlegroups.com...
>I have datagrid that I format at runtime with tablestyles and adding
> columns.  I have a DataGridBoolColumn that I have subclassed, but can't
> get the right result.  I want to disable a cell based on the initial
> value of that checkbox.  If the initial value is checked, I want it to
> be disable where the user can't change it.  If the intial value is not
> checked, then the user can select and deselect the checkbox.  When the
> datagrid is first rendered, a row with a value of 1 will be checked and
> will be disabled, but the problem I am having is that when I check one
> of the other checkboxes for another row, they to become disabled and I
> cannot uncheck them.  I have been working on this for days with no
> luck.  Any help would be appreciated.
>