cell is enabled property

Mar 10, 2009 at 1:55 PM
Hi,

I'm using WPF toolkit datagrid and I have a cell I would like it to be disabled when a checkbox is true..

How can you do this? (I can't seem to find the IsEnable property)

Thanks in advance
Coordinator
Mar 10, 2009 at 5:21 PM
Hi RuiLopes,

Every control derived from UIElement has an IsEnabled property. You will have to set it using CellStyle property defined on DataGrid or DataGridColumn.
Mar 10, 2009 at 6:20 PM
Thanks for your input VamseeP..

Glad to know it can be done..

do you have any code example of that? or can you point me to a link ehre I can find it?

thanks in advance
Apr 7, 2009 at 9:01 AM
Hi there,

Does anybody have an idea how to do this?

I really need this...

Any help/idea is mostly appreciated...

Thanks in advance
Apr 7, 2009 at 9:34 AM

I think  this would helps you.
dg:DataGridCheckBoxColumn >
                            <dg:DataGridCheckBoxColumn.EditingElementStyle>
                                <Style TargetType="CheckBox">

                                    <Style.Triggers>
                                        <Trigger Property="IsChecked" Value="False">
                                         
                                            <Setter Property="IsEnabled" Value="False" />
                                       
                                        </Trigger>
                                        <Trigger Property="IsChecked" Value="True">
                                            <Setter Property="IsEnabled" Value="True" />
                                          
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </dg:DataGridCheckBoxColumn.EditingElementStyle>

                        </dg:DataGridCheckBoxColumn>