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

CTRL+A // Select all rows support

1 Answer 100 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Elmar
Top achievements
Rank 1
Elmar asked on 23 Oct 2008, 03:03 PM
Hi there.

Is there a way to wire up the standard CTRL+A (select all) to select all rows (Given, that row-multiselect is enabled, of course)?

I was expecting this to be a standard-feature but I am sure that it can be "imitated" quite easily. It would be great to learn how to do this with the GridView.

Thanks,
Elmar

1 Answer, 1 is accepted

Sort by
0
Elmar
Top achievements
Rank 1
answered on 27 Oct 2008, 08:22 AM
Ok, fixed it myself. In case anyone runs into this one - here is the code:

private void GrivView_KeyDown(object sender, KeyEventArgs e) 
    if ( ( e.KeyCode == Keys.A ) && ( e.Modifiers == Keys.Control ) ) 
    MessageBox.Show ( "Ctrl + A pressed" ) ; 

Makes sure to handle KeyDown and not KeyPress.

cheers,
Elmar
Tags
GridView
Asked by
Elmar
Top achievements
Rank 1
Answers by
Elmar
Top achievements
Rank 1
Share this question
or