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

next row in radgrid

3 Answers 260 Views
GridView
This is a migrated thread and some comments may be shown as answers.
niloo norouzi
Top achievements
Rank 1
niloo norouzi asked on 08 Aug 2009, 05:41 AM
hi
before i use these code for next row in gridview  but in radgrid i don't know.
privatevoid btnNext_Click(object sender, EventArgs e)
{
int index = radgrid1.CurrentRow.Index + 1;
if (index == radgrid1.Rows.Count)
index = 0;
radgrid1.Rows[index].Cells[0].Selected =
true;
}
please help me
thank you very much

3 Answers, 1 is accepted

Sort by
0
niloo norouzi
Top achievements
Rank 1
answered on 08 Aug 2009, 09:11 AM
I need answer.please help
0
Robert
Top achievements
Rank 1
answered on 09 Aug 2009, 12:07 AM
Hello,

Here's what you are looking for:

        private void radButton1_Click(object sender, EventArgs e) 
        { 
            int rowIndex = radGridView1.Rows.IndexOf((GridViewDataRowInfo)radGridView1.CurrentRow); 
            rowIndex++; 
            if (rowIndex >= radGridView1.Rows.Count) 
                rowIndex = 0; 
            radGridView1.CurrentRow = radGridView1.Rows[rowIndex]; 
        } 

- Robert


0
niloo norouzi
Top achievements
Rank 1
answered on 09 Aug 2009, 06:16 AM
thank you very much
Tags
GridView
Asked by
niloo norouzi
Top achievements
Rank 1
Answers by
niloo norouzi
Top achievements
Rank 1
Robert
Top achievements
Rank 1
Share this question
or