This is a migrated thread and some comments may be shown as answers.

GridView Record Navigation Methods

1 Answer 99 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Damian
Top achievements
Rank 1
Damian asked on 11 Jul 2013, 05:17 PM

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;            
                 
            }
        }

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 15 Jul 2013, 06:04 AM
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 >>
Tags
GridView
Asked by
Damian
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or