Hi,
I have a RadGridView bind to a datatable and sort by Name column. My problem is after I modify the Name column, the RadGridView performs a 'auto sort' and the current selected row is deselected and the SelectedItem is Nothing.
How can I preserve the selected row after the 'auto sort'?
Thanks,
Chris
<
telerik:RadGridView
DockPanel.Dock
=
"Top"
x:Name
=
"gv"
SelectionMode
=
"Single"
RowHeight
=
"30"
IsSynchronizedWithCurrentItem
=
"True"
AutoGenerateColumns
=
"False"
ShowGroupPanel
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Path=Name}"
Header
=
"Name"
UniqueName
=
"Name"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Path=PhoneNumber}"
Header
=
"Phone Number"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Path=City}"
Header
=
"City"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Path=State}"
Header
=
"State"
/> </
telerik:RadGridView.Columns
>
<
telerik:RadGridView.SortDescriptors
>
<
telerik:ColumnSortDescriptor
Column
=
"{Binding Columns[\Name\], ElementName=gv}"
SortDirection
=
"Ascending"
/>
</
telerik:RadGridView.SortDescriptors
>
</
telerik:RadGridView
>