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.

Keyboard equivalents in GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

14989 Jun 9,2004 09:54 AM Jun 9,2004 07:48 PM Windows Forms 6
loading
Tags: GridControl
Lori S. Pearsall
Asked On June 9, 2004 09:54 AM

I have a couple of questions regarding keyboard equivalents to mouse actions : 1) For a PushButton control, is there a keyboard equivalent to a mouse click? I''ve tried space and I see the button depress like it''s been clicked, but the CellButtonClicked event doesn''t fire. 2) I put some code in ProcessCmdKey to handle a Alt-Down keystroke to show the dropdown on some custom cell models that I have. I keyed off of whether ButtonSize was 0,0 or not to determine whether there was a button present in the cell. This was working well until I changed my ActivateCurrentCellBehavior from ClickOnCell to SetCurrent. I now get an error on my ShowDropDown call. Is there another way to cause the dropdown to appear? Thanks!

Administrator [Syncfusion]
Replied On June 9, 2004 10:41 AM

1) The PushButtonClick event should fire when you press space on a PushButton cell. (But the CellButtonClicked does not.) 2) What error are you getting? The change to SetCurrent means that the cell control will normally be active for edit when you press alt+down, and this was not always the case before. One thing you could try is to call CurrentCell.Deactivate before you call CurrentCell.ShowDropDown. This may make things work if the problem is trying to drop your control while the cell is actively being edited.

Lori S. Pearsall
Replied On June 9, 2004 11:06 AM

1) That worked! 2) NullReferenceException I''ve tried the following and still get the error : if (!this.CurrentCell.IsDroppedDown) { GridCurrentCell holdCurrentCell = this.CurrentCell; holdCurrentCell.Deactivate(false); while (holdCurrentCell.IsInDeactivate) { } holdCurrentCell.ShowDropDown(); return true; } >1) The PushButtonClick event should fire when you press space on a PushButton cell. (But the CellButtonClicked does not.) > >2) What error are you getting? > >The change to SetCurrent means that the cell control will normally be active for edit when you press alt+down, and this was not always the case before. One thing you could try is to call CurrentCell.Deactivate before you call CurrentCell.ShowDropDown. This may make things work if the problem is trying to drop your control while the cell is actively being edited.

Administrator [Syncfusion]
Replied On June 9, 2004 11:09 AM

What is null? If you can post a sample project showing the problem, we can try to spot something here.

Lori S. Pearsall
Replied On June 9, 2004 11:28 AM

I''ve overridden GridTextBoxCellModel to create a textbox with a dropdown form if a lot of text is to be entered. The call to ShowDropDown() fails with "dropDownImp is null". I''ve verified that only those cells that do have a dropdown are having the code above executed. If you need a sample, that will take a little while but let me know.

Administrator [Syncfusion]
Replied On June 9, 2004 11:43 AM

Are you dynamically changing the celltype of this celll in some event like QueryCellInfo or PrepareViewStyleInfo. Sometimes, the cell my be initialized using the old celltype (that maybe does not have a dropdown) before the new celltype is applied, and this is why the null reference. If you cannot spot something and post a sample, we can try to spot something here.

Lori S. Pearsall
Replied On June 9, 2004 07:48 PM

I decided to go a different way and expose my OnButtonClicked methods in the custom dropdown grid controls. Thanks!

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.

;