This is a migrated thread and some comments may be shown as answers.

code behind get current select row

1 Answer 113 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
kity
Top achievements
Rank 2
kity asked on 18 Jul 2014, 01:51 PM
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>

1 Answer, 1 is accepted

Sort by
0
kity
Top achievements
Rank 2
answered on 18 Jul 2014, 02:13 PM
var row = (sender as RadComboBox).ParentOfType<GridViewRow>();
                var itemSelect = row.Item as ENasaAstro;
Tags
TreeListView
Asked by
kity
Top achievements
Rank 2
Answers by
kity
Top achievements
Rank 2
Share this question
or