Reputation: 5899
I want to select GridControl's row, after data binding:
- Get selected row
- Bind GridControl with new Data
- Select GridControl's row
I'm trying so, but with no success:
int selectedRowhandle = gridControl1.View.GetSelectedRowHandles()[0];
gridControl1.DataSource = "DataSource...";
gridControl1.View.SelectRow(selectedRowhandle);
How can I do this in DevExpress.Xpf.Grid.GridControl?
Thanks.
Upvotes: 1
Views: 12244
Reputation: 5899
I only changed this:
gridControl1.View.SelectRow(selectedRowhandle);
to
gridControl1.View.FocusedRowHandle = selectedRowhandle;
and it works.
Upvotes: 2