We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How do you get GridControl keyboard navigation with GridDataControl

I am using the GridDataControl and want to get the same keyboard navigation that the GridControl has (specifically to be able to hit the left and right arrow keys and navigate left and right between the cells).

I have tried following, but it is not working:

grid.Loaded += (sender, args) =>
{
this.grid.Model.Options.AllowSelection = GridSelectionFlags.Keyboard;
};


I have tried using different GridSelectionFlags, but none of have the functionality i need. Any help is appreciated.

Michael

4 Replies

MK Michael kacher March 9, 2010 08:00 PM UTC

I have got part of the functionality I need in case any one else has this same issue. In the onload I added:

this.grid.Model.Options.ShowCurrentCell = true;

This allows you to see the box around the selected cell and navigate it with the keyboard. The problem I am having is that I can not change the text in the cell two-thirds of the time. I will start typing text and sometimes it will work correctly and let me edit the value in the field, but other times I will see the text in the selected cell lower by a few pixels and I can not navigate around in the grid any more until I hit enter or esc.

If I manually click in the cell with my mouse I am always able to edit the value. I have set the ActivateCurrentCellBehavior to clickOnce and SelectAll (example below), but neither of those worked either. Any help from Syncfusion on what is going on and how to resolve it would be greatly appreciated.

this.grid.Model.Options.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;

Best Regards,

Michael



CB Clay Burch Syncfusion Team March 9, 2010 11:24 PM UTC

If you drop a GridDataControl in a Window and set its ItemsSource property, the left and right arrow keys work as expected. Here is a sample showing the arrow keys working.

Does this sample work for you? What are you doing differently?




WpfApplication28_e9ff7a40.zip


MK Michael kacher March 10, 2010 03:54 PM UTC

I appreciate your respone. I figured out my problem was that I was using the 7.1 version of the dlls. I updgraded to 7.3 and it resolved all of my issues.

Thank you,

Michael


KV Karthik Vishnu R Syncfusion Team March 11, 2010 03:40 AM UTC

Hi Michael,

Thanks for the reponse. Let us know if you need more details.

Regards,
Karthik

Loader.
Live Chat Icon For mobile
Up arrow icon