Hi everyone,
I have an issue with selection of data from the RadGridView. The issue is that suddenly, after updating my Telerik Controls for WPF to 2013.1.220.40 it started hating my selection code.
I have the following XAML:
Which then triggers the following c# code when selecting a row:
However, when I select a row it the dgOrderOverview.SelectedItem is always null. If I look at it in the VS debugger I find that it says that SelectionEventArgs flags "remove" to the item I've selected, but the "added" is always null.
How come? This is new to me, it's been working since December before updating the RAD Controls for WPF.
//Johannes
I have an issue with selection of data from the RadGridView. The issue is that suddenly, after updating my Telerik Controls for WPF to 2013.1.220.40 it started hating my selection code.
I have the following XAML:
<telerik:RadGridView Name="dgOrderOverview" AutoGenerateColumns="False" SelectionChanged="dgOrderOverview_SelectionChanged" SelectionMode="Single" SelectionUnit="FullRow" IsReadOnly="True" CanUserDeleteRows="False" CanUserInsertRows="False" IsBusy="False" telerik:StyleManager.Theme="Windows8" > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=ShipmentID}" Header="ShipmentID" UniqueName="ShipmentID" IsReadOnly="True" IsVisible="False" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=OrderNo}" Header="Order no" UniqueName="OrderNo" IsReadOnly="True" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Pieces}" Header="Pieces" UniqueName="Pieces" IsReadOnly="True" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=ReceiverName}" Header="Receiver" UniqueName="ReceiverName" IsReadOnly="True" /> </telerik:RadGridView.Columns></telerik:RadGridView>Which then triggers the following c# code when selecting a row:
private void dgOrderOverview_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e){ OverViewData r = (OverViewData)dgOrderOverview.SelectedItem; shipID = r.ShipmentID; lblSelectedReceiver.Content = r.ReceiverName; lblSelectedShipment.Content = shipID; if(dpStatusDate.SelectedDate == null) dpStatusDate.SelectedDate = DateTime.Now; tpStatusTime.Value = DateTime.Now; canvas1.Visibility = Visibility.Visible; lblCUselShipment.Content = r.ShipmentID;}However, when I select a row it the dgOrderOverview.SelectedItem is always null. If I look at it in the VS debugger I find that it says that SelectionEventArgs flags "remove" to the item I've selected, but the "added" is always null.
How come? This is new to me, it's been working since December before updating the RAD Controls for WPF.
//Johannes