SelectNextRow the group does not work
radGridView1.GridNavigator.SelectNextRow(1);
When the next group arrives Does not work.
radGridView1.GridNavigator.SelectNextRow(1);
When the next group arrives Does not work.
6 Answers, 1 is accepted
0
Hi Ali,
Thank you for contacting Telerik Support.
I was not able to reproduce the issue you are describing on my end. Please find attached below my sample project which I used for my tests. Can you please provide me with some additional information or a sample project which will help me to further investigate your case.
Thank you for the cooperation, looking forward to your reply.
Regards,
George
Telerik
Thank you for contacting Telerik Support.
I was not able to reproduce the issue you are describing on my end. Please find attached below my sample project which I used for my tests. Can you please provide me with some additional information or a sample project which will help me to further investigate your case.
Thank you for the cooperation, looking forward to your reply.
Regards,
George
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 >>
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 >>
0
Ali
Top achievements
Rank 1
answered on 27 Sep 2013, 03:26 PM
tanks
When I hit Enter key to go to the next row
I like when the group arrives. The group did not stop.
And go to the next row.
But the group arrives. collapse is
namespace RadGridViewSelectNextRow
{
public partial class Form
1
: Form
{
private RadGridView grid = new RadGridView();
private RadButton btn = new RadButton();
private Random rnd = new Random();
private List<Dummy> dataSource = new List<Dummy>();
public Form
1
()
{
InitializeComponent();
this.grid.Dock = DockStyle.Fill;
this.grid.Parent = this;
this.grid.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
this.btn.Dock = DockStyle.Bottom;
this.btn.Text =
"Move to next row"
;
this.btn.Click += btn_Click;
this.btn.Parent = this;
for (int i =
0
; i <
100
; i++)
{
this.dataSource.Add(new Dummy
{
Id = rnd.Next(
0
,
6
),
Name =
"Name number "
+ i
});
}
this.grid.DataSource = this.dataSource;
this.Load += Form
1
_Load;
this.grid.KeyUp += new System.Windows.Forms.KeyEventHandler(this.radGridView
1
_KeyUp);
}
void Form
1
_Load(object sender, EventArgs e)
{
GroupDescriptor descriptor = new GroupDescriptor(
"Id"
);
this.grid.GroupDescriptors.Add(descriptor);
this.grid.MasterTemplate.AutoExpandGroups = true;
}
void btn_Click(object sender, EventArgs e)
{
this.grid.GridNavigator.SelectNextRow(
1
);
}
private void radGridView
1
_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
this.grid.GridNavigator.SelectNextRow(
1
);
this.grid.BeginEdit();
}
}
}
public class Dummy
{
public int Id {get;set;}
public string Name {get;set;}
}
}
0
Hello Ali,
Thank you for writing back.
In that case you need to change the default behavior of the grid. You can create a custom GridGroupRowBehavior:
The behavior can be used as follows:
I hope this helps.
Regards,
George
Telerik
Thank you for writing back.
In that case you need to change the default behavior of the grid. You can create a custom GridGroupRowBehavior:
public
class
MyRowBehavior : GridGroupRowBehavior
{
protected
override
bool
ProcessEnterKey(KeyEventArgs keys)
{
return
false
;
}
}
The behavior can be used as follows:
((BaseGridBehavior)
this
.grid.GridBehavior).UnregisterBehavior(
typeof
(GridViewGroupRowInfo));
((BaseGridBehavior)
this
.grid.GridBehavior).RegisterBehavior(
typeof
(GridViewGroupRowInfo),
new
MyRowBehavior());
I hope this helps.
Regards,
George
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 >>
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 >>
0
Ali
Top achievements
Rank 1
answered on 03 Oct 2013, 07:34 AM
tanks
0
Björn
Top achievements
Rank 1
answered on 07 Mar 2014, 09:25 AM
[quote]George said:
The behavior can be used as follows:
[/quote]
I'm so sorry about it.
I implemented it on monday as shown above and ran it successfully, but next day it does not work anymore.
I can reproduce it on my pc that it dont work, but on another computer it does run normally. Both systems does have the same source code from monday. So I didn't changed it.
No breakpoint in my custom behavior hit anymore. And yes, the behavior is registered and nowhere removed or unregistered. Do you have any suggestions for me?
I thought, maybe it's not the correct registeration type when register the behavior.
regards
Björn (Bjoern)
The behavior can be used as follows:
((BaseGridBehavior)
this
.grid.GridBehavior).UnregisterBehavior(
typeof
(GridViewGroupRowInfo));
((BaseGridBehavior)
this
.grid.GridBehavior).RegisterBehavior(
typeof
(GridViewGroupRowInfo),
new
MyRowBehavior());
I'm so sorry about it.
I implemented it on monday as shown above and ran it successfully, but next day it does not work anymore.
I can reproduce it on my pc that it dont work, but on another computer it does run normally. Both systems does have the same source code from monday. So I didn't changed it.
No breakpoint in my custom behavior hit anymore. And yes, the behavior is registered and nowhere removed or unregistered. Do you have any suggestions for me?
I thought, maybe it's not the correct registeration type when register the behavior.
regards
Björn (Bjoern)
0
Hello Bjorn,
Thank you for contacting us.
From the provided information I find it hard to understand what the root of the problem may be, moreover that without any change in your code the behavior changed.
That is why I would like to kindly ask you to provide me with a sample project where this behavior is reproduced so I can investigate this case properly.
Looking forward to your response.
Regards,
George
Telerik
Thank you for contacting us.
From the provided information I find it hard to understand what the root of the problem may be, moreover that without any change in your code the behavior changed.
That is why I would like to kindly ask you to provide me with a sample project where this behavior is reproduced so I can investigate this case properly.
Looking forward to your response.
Regards,
George
Telerik
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.