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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

problem with keyboard shortcut ALT+Z when editing text in grid's cell

Thread ID:

Created:

Updated:

Platform:

Replies:

142376 Jan 30,2019 08:48 AM UTC Feb 4,2019 05:05 AM UTC WinForms 5
loading
Tags: GridGroupingControl
amsm
Asked On January 30, 2019 08:48 AM UTC

hi,
I'm using polish (programmers) keyboard (OS setting) where there are defined shortcuts like ALT right + Z to enter polish national character ż.
There is the problem when I try to type in grid's cell any text containing this ż character using keyboard shortcut ALT+Z (e.g. "abcż"). When editing text, at the moment of typing ALT+Z keyboard shortcut, the cell's text box is suddenly closed and entered text is discarded.
The problem does not occur when the ż character is the first entered character in string.
Please help.
Best regards,
Adam.

Arulraj A [Syncfusion]
Replied On January 31, 2019 06:19 AM UTC

Hi Adam, 

Thanks for using Syncfusion product. 

We are able to reproduce the issue “Unable to type ‘ż’ as last letter while entering new text in the textbox cell in GridGroupingControl”. We are sorry to say that we have marked GridGroupingControl as classic control and we will not do any further development in it. We suggest you to use our new control SfDataGrid which do not have this issue and also has a better performance than GridGroupingControl. 

You can find the feature comparison between the GridGroupingControl and the SfDataGrid from the following link.   

Please refer to the following UG’s for working with SfDataGrid.   

Dashboard sample location: <Install Location>\Syncfusion\EssentialStudio\[Version Number]\Windows\DataGrid.Winforms\Samples 

Please let us know if you need any further details on this. 

Arulraj A 


amsm
Replied On January 31, 2019 10:27 AM UTC

hi,
thank You for information.
However, is there any way to handle the event of keyboard shortcut (ALT+Z) or maybe any keyboard input in cell's text box ?
I need a solution where I will be able to catch shortcut ALT+Z avoiding unexpected closing of editing text box and then change its content to properly display ż characters.
best regards,
Adam.

Mohanraj Gunasekaran [Syncfusion]
Replied On February 1, 2019 02:30 PM UTC

Hi Adam, 
 
By default, If you press the right Alt key, KeyEventArgs.Modifiers as Control in Polish culture. So, it will be act like a ctrl+z(undo) operation. So, you could handle this by OnKeyDown event. Please refer the following code example. 
 
C# 
this.gridGroupingControl1.TableControl.KeyDown += TableControl_KeyDown; 
private void TableControl_KeyDown(object sender, KeyEventArgs e) 
{ 
    bool controlKeyDown = (e.Modifiers & Keys.Control) != Keys.None; 
    if (e.KeyCode == Keys.Z && this.gridGroupingControl1.TableControl.CurrentCell.IsModified) 
    { 
        e.Handled = true; 
    } 
} 
 
 
Regards, 
Mohanraj G 


amsm
Replied On February 2, 2019 09:46 PM UTC

hi,
thank You very much for help.
following code sample should work pretty well.

grid.TableControl.CurrentCellKeyDown += (s, e) => {

    e.SuppressKeyPress = e.Control && e.Alt && e.KeyCode == Keys.Z && (s as GridTableControl).CurrentCell.IsModified;

};

best regards.

Adam


Arulraj A [Syncfusion]
Replied On February 4, 2019 05:05 AM UTC

Hi Adam,

Thanks for the update.

Please feel free to contact us in case of any further difficulty. We'll be glad to assist you.

Regards,
Arulraj A

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;