This is a migrated thread and some comments may be shown as answers.

Problem of hitting the spacebar

5 Answers 53 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Levon
Top achievements
Rank 1
Levon asked on 29 May 2013, 09:36 PM
Hi,
I have a TextBox in my GridView GroupRow, and when I try to write a text in it, and press the space bar, my Group is expanded/collapsed, and no space appears in the TextBox. How can I solve this problem?

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 30 May 2013, 09:02 AM
Hi,

I can suggest you the following solution:

1. Add handler to the KeyDown event of the page
this.AddHandler(FrameworkElement.KeyDownEvent, new KeyEventHandler(OnKeyDown), true);

2. Handle it properly

private void OnKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
        if (e.Key == System.Windows.Input.Key.Space)
        {
            e.Handled = false;
        }
}

That way the TextBox will accept the "Space". Let me know how it works for you.

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Levon
Top achievements
Rank 1
answered on 30 May 2013, 10:23 AM
Thank you for your answer, but this does not work for me, because it continues to expand and collapse. Every time I hit the spacebar a space appears in the textbox, but the group expands or collapses.
0
Dimitrina
Telerik team
answered on 30 May 2013, 02:32 PM
Hello,

Would it be possible for your to isolate the issue in a demo project and send it to me? That way I can debug it locally and advise better.

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Levon
Top achievements
Rank 1
answered on 31 May 2013, 06:34 AM
How can I send you a sample? The allowed extensions to attach a file are: .gif, .jpg, .jpeg, .png
0
Maya
Telerik team
answered on 31 May 2013, 06:51 AM
Hello Levon,

You can open a support ticket and attached your zipped project there. 

Regards,
Maya
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Levon
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Levon
Top achievements
Rank 1
Maya
Telerik team
Share this question
or