Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have a Telerik RadGridView control with many cells.

I need to use a button event "find next" to find next cells in gridview programmatically using c# winforms.

Consider that I have 10 cells in gridview if I click find next button it should select each cells which are in gridview one by one.
please provide me a solution!

Thanks.
Posted
Updated 25-Nov-13 19:58pm
v3
Comments
StM0n 26-Nov-13 2:27am    
Just to clarify things: You want a button, which enables you to select the next cell, regardless if it is in the next row?
Member 10391350 26-Nov-13 3:15am    
yes,absolutely right!
lukeer 26-Nov-13 4:00am    
Where's the problem?
As in: what have you tried and got stuck?
Are there any error messages? What do they read?
What behaviour do you expect? What do you see instead?
Member 10391350 26-Nov-13 4:32am    
private void FindNext_Click(object sender, EventArgs e)
{

if (Mygridview .RowCount > 0)
{
int MyDesiredIndex = 0;
if (Mygridview .CurrentRow.Index < Mygridview .RowCount - 1)
{

MyDesiredIndex = GvCollcontainer.CurrentRow.Index + 1;
}
Mygridview .Rows[MyDesiredIndex].IsSelected = true;

}
}


this is the code i have but its not selecting next cells.
Member 10391350 26-Nov-13 4:34am    
private void FindNext_Click(object sender, EventArgs e)
{

if Mygridview.RowCount > 0)
{
int MyDesiredIndex = 0;
if Mygridview.CurrentRow.Index < Mygridview.RowCount - 1)
{

MyDesiredIndex = Mygridview.CurrentRow.Index + 1;
}
Mygridview.Rows[MyDesiredIndex].IsSelected = true;

}
}

this is code i have and i am not able to select next cells in gridview.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900