Hi,
I need to make a RadButton visible when the row that contains it is selected and collapsed when its row is not selected. The button is placed in the last column. Ideally, I'd like to bind the Visibility property to a property on the row and use a converter to return Visible or Collapsed.
Here is the XAML:
I've tried using the SelectionChanged event handler, but just can't seem to find the button that lives in the selected row.
Any suggestions?
I need to make a RadButton visible when the row that contains it is selected and collapsed when its row is not selected. The button is placed in the last column. Ideally, I'd like to bind the Visibility property to a property on the row and use a converter to return Visible or Collapsed.
Here is the XAML:
<
telerik:RadGridView
Grid.Row
=
"1"
Grid.Column
=
"0"
x:Name
=
"myNotificationsGv"
ItemsSource
=
"{Binding Path=MyNotificationMessages}"
Controls:StyleManager.Theme
=
"Vista"
AutoGenerateColumns
=
"False"
IsReadOnly
=
"True"
RowIndicatorVisibility
=
"Collapsed"
ag1:RadGridViewHeaderMenu.IsEnabled
=
"True"
ShowGroupPanel
=
"False"
DataLoadMode
=
"Synchronous"
IsSynchronizedWithCurrentItem
=
"true"
ScrollMode
=
"Deferred"
telerikGridViewFilter:CustomFilterRow.IsEnabled
=
"True"
SelectionUnit
=
"FullRow"
VerticalContentAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
HorizontalAlignment
=
"Stretch"
SelectionChanged
=
"myNotificationsGvSelectionChanged"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"{Binding Path=NotificationStrings.NameColumnTitle, Source={StaticResource ResourceWrapper}}"
DataMemberBinding
=
"{Binding Path=JobName}"
/>
<
telerik:GridViewDataColumn
Header
=
"{Binding Path=NotificationStrings.OrganizationColumnTitle, Source={StaticResource ResourceWrapper}}"
DataMemberBinding
=
"{Binding Path=OrganizationName}"
/>
<
telerik:GridViewDataColumn
Header
=
"{Binding Path=NotificationStrings.TypeColumnTitle, Source={StaticResource ResourceWrapper}}"
DataMemberBinding
=
"{Binding Path=NotificationMessageType.Name}"
/>
<
telerik:GridViewDataColumn
Header
=
"{Binding Path=NotificationStrings.DateColumnTitle, Source={StaticResource ResourceWrapper}}"
DataMemberBinding
=
"{Binding Path=DateCreated, StringFormat='dd MMM yyyy'}"
MaxWidth
=
"200"
/>
<
telerik:GridViewColumn
Width
=
"90"
>
<
telerik:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
Controls:RadButton
x:Name
=
"ForwardBtn"
Content
=
"{Binding Path=NotificationStrings.Forward, Source={StaticResource ResourceWrapper}}"
Tag
=
"{Binding Path=Id}"
Click
=
"ForwardBtn_Click"
Style
=
"{StaticResource ForwardButtonStyle}"
Visibility
=
"Collapsed"
/>
</
DataTemplate
>
</
telerik:GridViewColumn.CellTemplate
>
</
telerik:GridViewColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
I've tried using the SelectionChanged event handler, but just can't seem to find the button that lives in the selected row.
Any suggestions?