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.
Unfortunately, activation email could not send to your email. Please try again.

space bar in a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

11312 Mar 2,2004 08:41 AM Mar 3,2004 05:53 AM Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 2, 2004 08:41 AM

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

Administrator [Syncfusion]
Replied On March 2, 2004 11:51 AM

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?

Administrator [Syncfusion]
Replied On March 2, 2004 01:08 PM

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?

Administrator [Syncfusion]
Replied On March 2, 2004 03:34 PM

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

Administrator [Syncfusion]
Replied On March 3, 2004 04:49 AM

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?

Administrator [Syncfusion]
Replied On March 3, 2004 05:53 AM

It displays in my output window.

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.

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.

;