Click here to Skip to main content
Rate this: bad
good
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 19:21pm
Edited 25-Nov-13 19:58pm
11.9K
v3
Comments
s_mon at 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 at 26-Nov-13 3:15am
   
yes,absolutely right!
lukeer at 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 at 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 at 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
0 CPallini 325
1 Sergey Alexandrovich Kryukov 249
2 OriginalGriff 230
3 George Jonsson 130
4 ChauhanAjay 104
0 OriginalGriff 6,464
1 Sergey Alexandrovich Kryukov 5,915
2 CPallini 5,175
3 George Jonsson 3,559
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 26 Nov 2013
Copyright © CodeProject, 1999-2014
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