Hello
I am trying to get my DataGrid to use a method whenever a cell in the grid is selected. I have tried to use the GestureRecognizers to get the functionality but my method. Am i approaching this the wrong way? Or is there something that I am missing?
This is what I have right now for the xaml DataGrid:
<
ScrollView
Grid.Row
=
"2"
IsClippedToBounds
=
"True"
>
<
telerikGrid:RadDataGrid
AutoGenerateColumns
=
"False"
x:Name
=
"AssignedRolesList"
Margin
=
"10,5,0,10"
SelectionMode
=
"Single"
SelectionUnit
=
"Cell"
>
<
telerikGrid:RadDataGrid.GestureRecognizers
>
<
TapGestureRecognizer
Tapped
=
"GoToOperationalPeriods"
/>
</
telerikGrid:RadDataGrid.GestureRecognizers
>
<
telerikGrid:RadDataGrid.GroupDescriptors
>
<
common:PropertyGroupDescriptor
PropertyName
=
"RoleName"
/>
</
telerikGrid:RadDataGrid.GroupDescriptors
>
<
telerikGrid:RadDataGrid.Columns
>
<
telerikGrid:DataGridTextColumn
PropertyName
=
"OperationalPeriodName"
HeaderText
=
"Assigned Roles"
HeaderStyle
=
"{StaticResource DataGridHeader}"
/>
</
telerikGrid:RadDataGrid.Columns
>
</
telerikGrid:RadDataGrid
>
</
ScrollView
>
This is what my function is on the backend:
private void GoToOperationalPeriods(object sender, EventArgs e)
{
RoleOperationalPeriodsDto selectedCell = (RoleOperationalPeriodsDto)AssignedRolesList.SelectedItem;
Navigation.PushAsync(new ViewOperationalPeriods(selectedCell.OperationalPeriodId), true);
}
Thanks,
Evan