CurrentCell and CurrentRow not in sync

2 posts, 0 answers
  1. Alex
    Alex avatar
    23 posts
    Member since:
    Oct 2012

    Posted 24 Jan 2013 Link to this post

    It seems that the CurrentCell and CurrentRow are not kept in sync.

    I think this is similar to what's mentioned in this post:
    http://www.telerik.com/community/forums/wpf/gridview/radgridview-observablecollection-and-currentitem.aspx

    We fixed it with this code:
    private void ContractProxyGridView_CurrentCellChanged(object sender, GridViewCurrentCellChangedEventArgs e)
            {
                if (e.NewCell == null || e.NewCell.ParentRow == null) return;
                e.NewCell.ParentRow.IsCurrent = true;
            }

    Is there a reason for this behavior?

    Thanks,
    Alex
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 25 Jan 2013 Link to this post

    Hello Alex,

    Thank you for contacting us.

    Actually you will need to set the IsSyncronizedWithCurrentItem property of the RadGridView to True in order to have the SelectedItem(and 
    CurrentCell) synchronized with the CurrentItem. This will be done after the CurrentCell has changed and the CurrentItem can be used outside of the CurrentCellChanged event.

    We will further investigate why it is changed so late (after the CurrentCellChanged event has been raised). 

    All the best,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top