This is a migrated thread and some comments may be shown as answers.

CurrentCell and CurrentRow not in sync

1 Answer 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 24 Jan 2013, 05:40 PM
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

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 25 Jan 2013, 08:04 AM
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.

Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or