This question is locked. New answers and comments are not allowed.
I have a RadGridView that has RowDetailsTemplate assign to DataTemplate defined in my App.xaml.
Here is the DataTemplate in my App.xaml:
How can I reference/use aCheckBox or aReasonLabel or aTextBox in my code-behind?
Thanks, Rob.
<
telerik:RadGridView
x:Name
=
"TransactionGridView"
Margin
=
"0"
FontSize
=
"10.667"
AreRowDetailsFrozen
=
"True"
AutoGenerateColumns
=
"False"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
CanUserResizeColumns
=
"False"
CanUserSortColumns
=
"False"
RowIndicatorVisibility
=
"Collapsed"
IsReadOnly
=
"True"
DataContext
=
"{Binding Source={StaticResource TransactionsData}}"
ItemsSource
=
"{Binding Collection}"
RowDetailsTemplate
=
"{StaticResource TransactionDetailDataTemplate}"
ShowGroupPanel
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewToggleRowDetailsColumn
/>
<
telerik:GridViewDataColumn
Header
=
"TxID"
IsVisible
=
"False"
DataMemberBinding
=
"{Binding TxID}"
/>
<
telerik:GridViewDataColumn
Header
=
"Date"
MaxWidth
=
"65"
MinWidth
=
"65"
Width
=
"65"
DataMemberBinding
=
"{Binding TxDate}"
/>
<
telerik:GridViewDataColumn
Header
=
"Description"
MaxWidth
=
"113"
MinWidth
=
"113"
Width
=
"113"
DataMemberBinding
=
"{Binding TxDescription}"
/>
<
telerik:GridViewDataColumn
Header
=
"Amt."
MaxWidth
=
"60"
MinWidth
=
"60"
Width
=
"60"
TextAlignment
=
"Right"
DataMemberBinding
=
"{Binding TxAmount}"
/>
<
telerik:GridViewDataColumn
Header
=
"Other"
MaxWidth
=
"55"
MinWidth
=
"55"
Width
=
"55"
TextAlignment
=
"Right"
DataMemberBinding
=
"{Binding Other}"
/>
<
telerik:GridViewDataColumn
Header
=
"Bal."
MaxWidth
=
"60"
MinWidth
=
"60"
Width
=
"60"
TextAlignment
=
"Right"
DataMemberBinding
=
"{Binding Balance}"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
Here is the DataTemplate in my App.xaml:
<
DataTemplate
x:Key
=
"TransactionDetailDataTemplate"
>
<
Grid
MinHeight
=
"28"
Style
=
"{StaticResource RowDetailBackground}"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"410"
/>
<
ColumnDefinition
Width
=
"85"
/>
<
ColumnDefinition
Width
=
"60"
/>
<
ColumnDefinition
Width
=
"230"
/>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
ListBox
x:Name
=
"TransactionDetailListBox"
Grid.Column
=
"0"
Grid.ColumnSpan
=
"4"
Margin
=
"100,0,0,0"
Background
=
"{x:Null}"
DataContext
=
"{Binding Source={StaticResource TransactionDetailData}}"
BorderBrush
=
"{x:Null}"
FontSize
=
"10.667"
>
<
ListBoxItem
Content
=
"{Binding Collection[0].Description1}"
/>
</
ListBox
>
<
CheckBox
x:Name
=
"aCheckBox"
Content
=
"Something"
Grid.Column
=
"1"
Grid.ColumnSpan
=
"1"
Style
=
"{StaticResource CheckBox}"
Visibility
=
"Collapsed"
/>
<
sdk:Label
x:Name
=
"aReasonLabel"
Grid.Column
=
"2"
Content
=
"Reason:"
Style
=
"{StaticResource LabelRight}"
Visibility
=
"Collapsed"
/>
<
TextBox
x:Name
=
"aTextBox"
Grid.Column
=
"3"
Grid.ColumnSpan
=
"1"
Style
=
"{StaticResource TextBoxLeftFill}"
Visibility
=
"Collapsed"
/>
</
Grid
>
</
DataTemplate
>
How can I reference/use aCheckBox or aReasonLabel or aTextBox in my code-behind?
Thanks, Rob.