Tech Off Thread

1 post

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

how to access child controls in wpf datagrid in code window

Back to Forum: Tech Off
  • User profile image
    ramaT

    Hi,

    How can I get button object in my code window, in order to disable next button when record moved to last record and vice versa.

    The following is the template columns in my data grid.

     

                <dg:DataGridTemplateColumn CanUserResize="False">

                   <dg:DataGridTemplateColumn.CellTemplate>

                      <DataTemplate>

                         <Button x:Name="btnPrevious" Tag="Previous" Width="15" Height="15" Background="Transparent" Click="MultiIndexSetNavigationClick">

                            <Image

                                  VerticalAlignment="Top"

                                  Source="{Binding Path=ResultHit,

                                  Converter={StaticResource ResultHitLevelResultsToImageConverter}}"/>

                         </Button>

                      </DataTemplate>

                   </dg:DataGridTemplateColumn.CellTemplate>

                </dg:DataGridTemplateColumn>

                <dg:DataGridTemplateColumn CanUserResize="False">

                   <dg:DataGridTemplateColumn.CellTemplate>

                      <DataTemplate>

                         <Button x:Name="btnNext" Tag="Next" Width="15" Height="15" Background="Transparent" Click="MultiIndexSetNavigationClick">

                            <Image 

                                      VerticalAlignment="Top"

                                      Source="{Binding Path=ResultHit,

                                      Converter={StaticResource ResultHitLevelResultsToImageConverter}}"

                                  />

                         </Button>

                      </DataTemplate>

                   </dg:DataGridTemplateColumn.CellTemplate>

                </dg:DataGridTemplateColumn>

     

    Regards,

    RamaS

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.