Hello Telerik Team,
I Have an issue regarding the filter of the grid on readOnly columns.
When the user goes between the filter cells with the Tab key or the Arrow keys the curser skips the readOnly columns.
How can this behavior be fixed?
Regards,
Namma.
3 Answers, 1 is accepted
Thank you for writing and for reporting this issue.
You can solve this issue by overriding the RadGridView behavior. You can create your behavior by inheriting from BaseGridBehavior and overriding the needed methods. I have attached a sample project where I have implemented this scenario for you.
I have added this bug in our Public Issue Tracking System - PITS. You can track the progress of this issue here. I have also updated your Telerik point for reporting this issue.
I hope this will help. If you have further questions, I would be glad to help.
Ivan Petrov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
b.s.
Thank you for your help.
I have used the cold you sent, it was very helpful.
But it does not cover the case when the grid contains Visible=False columns.
The cursor gets stack in a column if the next or previous column is Visibile=False.
I have fixed this bug, in the following function.
Note: my grid is right to left.
An upgrade of our points would be appreciated.
private bool ProcessNavigationalKeys(KeyEventArgs keys)
{
if (this.GridControl.CurrentRow is GridViewFilteringRowInfo)
{
int columnIndex = this.GridControl.CurrentColumn.Index;
if ((keys.KeyCode == Keys.Tab && keys.Shift) || keys.KeyCode == Keys.Right)
{
while (columnIndex > 0 && !this.GridControl.Columns[columnIndex - 1].IsVisible)
{
columnIndex--;
}
if (columnIndex > 0)
{
this.GridControl.Columns[columnIndex - 1].IsCurrent = true;
return true;
}
}
else if ((keys.KeyCode == Keys.Tab && !keys.Shift) || keys.KeyCode == Keys.Left)
{
while (columnIndex < this.GridControl.Columns.Count - 1 && !this.GridControl.Columns[columnIndex + 1].IsVisible)
{
columnIndex++;
}
if ( columnIndex < this.GridControl.Columns.Count - 1)
{
this.GridControl.Columns[columnIndex + 1].IsCurrent = true;
return true;
}
}
}
return false;
}
Thank you for your reply and for the code snippet.
Indeed, the code I sent does not take into consideration the columns that are not visible, but I am glad you have found your way around this. As to the Telerik points I have updated your points before my previous post was sent to you. Please check your account for the updated values.
Write back should you need further assistance.
Ivan Petrov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>