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

space bar in a cell

I am using the code from this forum to highlight an entire grid row and have my grid set as readonly. I need to take action when a user press the space bar on a row. I have tried KeyDown, KeyUp and CellClick but those are not what I need. How should I do this? thanks

5 Replies

AD Administrator Syncfusion Team March 2, 2004 04:51 PM UTC

If I have a row selected and press teh space bar, I can see both the grid''s CurrentCellKeyDown ebent and teh grid''s KeyDown event being hit. Will CurrentCellKeyDown work for you?


AD Administrator Syncfusion Team March 2, 2004 06:08 PM UTC

I think I see the difference now. Yes CurrentCellKeyDown will work if I am already on a cell row, but if use the mouse and select a different row then press the space bar my CurrentCellKeyDown event is not firing. I am getting a space added into the the first column of the selected row if the grid is not read only and nothing if its readonly. >If I have a row selected and press teh space bar, I can see both the grid''s CurrentCellKeyDown ebent and teh grid''s KeyDown event being hit. > >Will CurrentCellKeyDown work for you?


AD Administrator Syncfusion Team March 2, 2004 08:34 PM UTC

This sample below (does) not seem to have a poblem catch CurrentCellKeyDown (or KeyDown). Does it not work for you? What version are you using? Are you doing something differrent? forum11299_7924.zip


AD Administrator Syncfusion Team March 3, 2004 09:49 AM UTC

Thanks your sample worked. I was not setting the ColIndex to 0 in the CurrentCellActivating. Adding that fixed my problem. I have noticed serveral of your samples have Console.WriteLine''s in them but no code to create a console in the form_load. Is the console displaying on your end when you run this?


AD Administrator Syncfusion Team March 3, 2004 10:53 AM UTC

It displays in my output window.

Loader.
Live Chat Icon For mobile
Up arrow icon