Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
905
How to determine if a XamGrid row is visible
posted

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!

Parents
No Data
Reply
  • 30945
    Verified Answer
    Offline posted

    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

Children