GridView Selected Item Always Null

2 posts, 0 answers
  1. Mohamed
    Mohamed avatar
    1 posts
    Member since:
    Aug 2014

    Posted 16 Sep 2014 Link to this post


    I'm using RadGridView as below, when i try to access the currently Selected item it always returns with null.
    the grid items source is Data which is observable collection.

    it used to work correctly before but yet i don't know what went wrong. any help?

     <telerik:RadGridView Grid.Row="1"  CanUserReorderColumns="False" CanUserResizeRows="False"  Visibility="Hidden" SelectionUnit="FullRow"
                x:Name="grdRequests" IsFilteringAllowed="True" GroupRenderMode="Flat"  ShowGroupPanel="True" ItemsSource="{Binding Data}" AutoGenerateColumns="False"
                DistinctValuesLoading="RadGridView1_DistinctValuesLoading" RowHeight="30" CellValidating="grdRequests_CellValidating"    ScrollViewer.HorizontalScrollBarVisibility="Visible"
                BeginningEdit="grdRequests_BeginningEdit" AddingNewDataItem="grdRequests_AddingNewDataItem" >
    from C#:   grdRequests.SelectedItem always = null

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 17 Sep 2014 Link to this post


    May I ask you when do you try to access the SelectedItem? Generally, you can subscribe for the SelectionChanged event of RadGridView and monitor when the SelectedItem is set. Is the SelectedItem correctly set as this event is raised?

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top