Hi,
here is the XAML of my radGridView
I am trying to set selected row programatically like this-
Am I doing something wrong?
here is the XAML of my radGridView
<
telerikGridView:RadGridView
Name
=
"grdScope"
ScrollMode
=
"RealTime"
DockPanel.Dock
=
"Bottom"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
CanUserInsertRows
=
"False"
AutoGenerateColumns
=
"False"
CanUserSortColumns
=
"False"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
IsFilteringAllowed
=
"False"
CanUserResizeColumns
=
"True"
Telerik:StyleManager.Theme
=
"Office_Blue"
RowStyle
=
"{StaticResource GridViewRowStyleRow}"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
SelectionMode
=
"Single"
ScrollViewer.HorizontalScrollBarVisibility
=
"Disabled"
ItemsSource
=
"{Binding}"
RowDetailsVisibilityMode
=
"Collapsed"
RowIndicatorVisibility
=
"Collapsed"
IsReadOnly
=
"True"
ShowGroupPanel
=
"False"
AutoExpandGroups
=
"True"
RowLoaded
=
"grdScope_RowLoaded"
SelectionUnit
=
"FullRow"
SelectionChanged
=
"grdScope_SelectionChanged"
MouseDoubleClick
=
"grdScope_MouseDoubleClick"
DataLoadMode
=
"Asynchronous"
EnableColumnVirtualization
=
"True"
EnableRowVirtualization
=
"False"
>
I am trying to set selected row programatically like this-
var item = ((IList<Task>)
this
.grdScope.ItemsSource)[
this
.SelectedTaskIndex];
this
.grdScope.SelectedItem = item;
even when variable item has a non-null value, radGridView's SelectedItem property never changes from null to anything else when this code runs.Am I doing something wrong?