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

Determine Parent Row When Row Detail Template Is Slected

0 Answers 74 Views
GridView
This is a migrated thread and some comments may be shown as answers.
band
Top achievements
Rank 1
band asked on 30 Jun 2017, 09:04 PM

I have 2 Gridviews. Gridview B is nested inside GridView A. GridView B's ItemsSource comes from A.SelectedAttachments.

When I select a row in gridview B is there a way to programatically select GridViewA? I want to try to remove a row inside gridview B but how would I do that if I don't know the parent object it belongs to. 

 

My main goal is to be able to remove items from A.SelectedAttachments through a context menu of GridView B.

<DataTemplate x:Key="RowDetailTemplate">
    <telerik:RadGridView ItemsSource="{Binding SelectedAttachments}" Style="{StaticResource StdGrid}" >
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn Header="File" DataMemberBinding="{Binding FileName}"  />
            <telerik:GridViewDataColumn Header="Source Document" DataMemberBinding="{Binding Description}" EditTriggers="CellClick" IsReadOnly="False">
                <telerik:GridViewDataColumn.CellEditTemplate>
                    <DataTemplate>
                        <TextBox Text="{Binding Description}" Foreground="Gray" FontStyle="Italic" ></TextBox>
                    </DataTemplate>
                </telerik:GridViewDataColumn.CellEditTemplate>
                <telerik:GridViewDataColumn.CellTemplate>
                    <DataTemplate>
                        <TextBox Text="{Binding Description}" Foreground="Gray" FontStyle="Italic"></TextBox>
                    </DataTemplate>
                </telerik:GridViewDataColumn.CellTemplate>
            </telerik:GridViewDataColumn>
        </telerik:RadGridView.Columns>
    </telerik:RadGridView>
</DataTemplate>

No answers yet. Maybe you can help?

Tags
GridView
Asked by
band
Top achievements
Rank 1
Share this question
or