Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1360
UltraGrid copy using Ctrl+C
posted

Hi,

 

I am experiencing some weird behaviour in Infragistics, when copying cell's using the AllowMultiCellOperations setting on an UltraGrid.

It seems that both Ctrl+C and Ctrl+Shift+C trigger the copy behaviour. Since we want to use Ctrl+Shift+C to do something else, is there a way to work around this?

We are using Infragistics v7.2 with all the hotfixes installed.

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    kevinmeiresonne said:
    is there a way to work around this?

    Yes.

    All keyboard interaction in the grid is handled by the KeyActionMappings collection on the grid.

    If you loop through this collection, you will find a mapping for the letter "C" with the SpecialKeysRequired set to Ctrl.

    There's a property on the mapping called SpecialKeysDisallowed and it's just set to Alt. So what you need to do is change the SpecialKeysDisallowed to Alt or Shift. 


                foreach (KeyActionMappingBase kam in this.ultraGrid1.KeyActionMappings)
                {
                    if (kam.KeyCode == Keys.C && kam.SpecialKeysRequired == SpecialKeys.Ctrl)
                    {
                        kam.SpecialKeysDisallowed = SpecialKeys.Alt | SpecialKeys.Shift;
                    }

                }

Children