Is there a way to determine if a row is visible?
Scenario:After adding a new row to a XamGrid with column sorting enabled, if the newly added row is visible I don't want to call ScrollCellIntoView()
Calling ScrollCellIntoView() when the row is visible scrolls the row to the top of the grid viewer - I would like for it to stay where it is
Thanks!
Hello,
After further research and consulting with my team I have found better approach for implementing the functionality that you are looking for. You can change the event handler for the RowAdded event to look as follows:
private void xamGrid1_RowAdded(object sender, Infragistics.Controls.Grids.RowEventArgs e) { Dispatcher.BeginInvoke(new Action(() => { if (e.Row.Cells[0].Control == null) { xamGrid1.ScrollCellIntoView(e.Row.Cells[1]); } })); }
If you need any further assistance please do not hesitate to ask.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you Krasimir for your help!I do apologize for the delay...
I tried your example, the cell.Control was not null and ScrollCellIntoView() was not being called, yet the new row was scrolling to the top of the grid viewer
Seems setting the new row.cell active was scrolling it to the topFollowing your lead, I've resolved the issue with:
Dispatcher.BeginInvoke(() => cell.IsActive =
true);