Click here to Skip to main content
12,635,792 members (26,428 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# C#4.0 Gridview Telerik
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 25-Nov-13 20:21pm
Updated 25-Nov-13 20:58pm
StM0n14.1K
v3
Comments
s_mon 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 26 Nov 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100