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

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

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.

5 Replies

AA Arulraj A Syncfusion Team 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 



AM amsm 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.


MG Mohanraj Gunasekaran Syncfusion Team 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 



AM amsm 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



AA Arulraj A Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon