GridView Record Navigation Methods

2 posts, 0 answers
  1. Damian
    Damian avatar
    6 posts
    Member since:
    Mar 2011

    Posted 11 Jul 2013 Link to this post


    Hope the below button click methods can help someone in implementing records navigation (backward and forward) in RadGridView.

    private void btnPrev_Click(object sender, EventArgs e)
            {
                if (gridview1.CurrentRow.Index > 0)
                {
                    gridview1.ChildRows[gridview1.CurrentRow.Index - 1].IsCurrent = true;
                }
            }
            private void btnNext_Click(object sender, EventArgs e)
            {           
                if (gridview1.CurrentRow.Index < gridview1.ChildRows.Count - 1)
                {               
                    gridview1.ChildRows[gridview1.CurrentRow.Index + 1].IsCurrent = true;            
                     
                }
            }

  2. Stefan
    Admin
    Stefan avatar
    2911 posts

    Posted 15 Jul 2013 Link to this post

    Hi Damian,

    Thank you for sharing your code with the community, I am sure someone will benefit from it. 

    I have updated your Telerik Points for the community effort.

    Regards,
    Stefan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top