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
265
enable/disable a button within a XamGrid
posted

How do I enable/disable a button within a XamGrid? Below is an example xaml and I need to be able to enable/disable the buttonShipTo based on some business log.

 <ig:XamGrid x:Name="gridPO" ColumnWidth="*" AutoGenerateColumns="False" CellEnteredEditMode="gridPO_CellEnteredEditMode" DeleteKeyAction="DeleteRowsOfSelectedCellsAndRows"                             
                                     RowEnteredEditMode="gridPO_RowEnteredEditMode" RowExitedEditMode="gridPO_RowExitedEditMode" Margin="0,20,5,5"
                                CellExitingEditMode="gridPO_CellExitingEditMode" RowExitingEditMode="gridPO_RowExitingEditMode" Height="250">

<ig:UnboundColumn Key="unboundButton" IsFilterable="False" Width="55" >
                                <ig:UnboundColumn.HeaderTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="Ship To"/>
                                    </DataTemplate>
                                </ig:UnboundColumn.HeaderTemplate>
                                <ig:UnboundColumn.ItemTemplate>
                                    <DataTemplate>
                                        <Button x:Name="buttonShipTo" Content="Ship To" Click="buttonShipTo_Click" Height="20" Margin="0"
                                                Tag="{Binding ClubName}"/>
                                    </DataTemplate>
                                </ig:UnboundColumn.ItemTemplate>
                            </ig:UnboundColumn>
                            
               </ig:XamGrid.Columns>
</ig:XamGrid>