code behind get current select row

2 posts, 0 answers
  1. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 18 Jul 2014 Link to this post

    how to get current selected row without select row. only when change combobox item.
    how to get current grid row according selected combobox?

    I want when I select only last combobox to get last grid row item? Hot to do that?

    See attached image for more info.

    <telerik:GridViewDataColumn Header="NASA - NSSDC ID: ASTRO-1 " Width="350" IsReadOnly="True">
                                <telerik:GridViewDataColumn.CellTemplate>
                                    <DataTemplate>
                                        <StackPanel Orientation="Horizontal"  >                                      
                                            <telerikInput:RadComboBox Width="342" ItemTemplate="{StaticResource dtE}" x:Name="rcbEvent"
                                                        ItemsSource="{Binding Path=DataContext.EvCollection, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}} }"                                                                                                      
                                                        SelectedValuePath="ID"
                                                        SelectedValue="{Binding Path=EvField.ID, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true, NotifyOnValidationError=true, Mode=TwoWay }"
                                                        SelectedItem="{Binding Path=EvField, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true, NotifyOnValidationError=true, Mode=TwoWay }" SelectionChanged="rcbSo_SelectionChanged" />
                                        </StackPanel>
                                    </DataTemplate>
                                </telerik:GridViewDataColumn.CellTemplate>
                            </telerik:GridViewDataColumn>
  2. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 18 Jul 2014 in reply to kity Link to this post

    var row = (sender as RadComboBox).ParentOfType<GridViewRow>();
                    var itemSelect = row.Item as ENasaAstro;
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top