Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Pages instead of scrolling

Sort Posts: Previous Next
  •  07-04-2008, 5:02 AM Post no. 13426

    Pages instead of scrolling

    Hi, I'm wondering if the grid can be configured to use multiple pages instead of the vertical scrollbar, so that you can set it to display like 20 rows on a page and the user clicks on 'next page' to see the next set of data?

    Regards,

    Hans

  •  07-04-2008, 11:48 AM Post no. 13434 in reply to 13426

    Re: Pages instead of scrolling

     You can hide the scrollbar, and provide a button, and in the click handler, move the current row one page down or up.

    e.g.:

    private void Form1_Load( object sender, EventArgs e )

    {

        gridControl1.ScrollBars = GridScrollBars.Horizontal;

    }

    private void button1_Click( object sender, EventArgs e )

    {

        gridControl1.MoveCurrentRow( VerticalDirection.PageDown );

        gridControl1.CurrentRow.BringIntoView();

        gridControl1.SelectedRows.Clear();

        if( gridControl1.CurrentRow.CanBeSelected )

        {

            gridControl1.SelectedRows.Add( gridControl1.CurrentRow );

        }

    }


    André
    Software Developer and Tech Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.