Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1253
disable column at runtime
posted

Hi,

I have the following xaml code:

                               <igGrid:TemplateColumn Key="Test" HorizontalContentAlignment="Center">
                                    <igGrid:TemplateColumn.HeaderTemplate>
                                        <DataTemplate>
                                            <CheckBox x:Name="chkAll" Click="chkAll_Click" Content="Approve All" Grid.Column="0" Margin="10,2,2,2" />
                                        </DataTemplate>
                                    </igGrid:TemplateColumn.HeaderTemplate>
                                    <igGrid:TemplateColumn.ItemTemplate>
                                        <DataTemplate>
                                            <CheckBox x:Name="chkBox" IsChecked="False" IsEnabled="True" Click="chkBox_Click" />
                                        </DataTemplate>
                                    </igGrid:TemplateColumn.ItemTemplate>
                                </igGrid:TemplateColumn>


                                <igGrid:TextColumn  Key="ListPrice" IsReadOnly="True" >
                                    <igGrid:TextColumn.HeaderTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="List Price" TextWrapping="Wrap" Width="50"/>
                                        </DataTemplate>
                                    </igGrid:TextColumn.HeaderTemplate>
                                </igGrid:TextColumn>

How can I disable the columns at runtime?  Thanks!

 

Parents
No Data
Reply
  • 21382
    posted

    What do you mean by disable?  Do you mean "not editable"?  If so then there is an IsReadOnly property on the Column object

     

    http://help.infragistics.com/NetAdvantage/Silverlight/2009.2/CLR3.5/?page=Infragistics.Silverlight.XamWebGrid.v9.2~Infragistics.Silverlight.Controls.EditableColumn~IsReadOnly.html

     

Children
No Data