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.

OnClick event swallowed

Thread ID:





30518 Jun 20,2005 05:01 AM Jun 20,2005 09:20 AM Windows Forms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On June 20, 2005 05:01 AM

I''ve implemented a custom TreeCell based on the sample Windows\Grid.Windows\Samples\In Depth\VirtTreeGrid GridControl.ListBoxSelectionMode = SelectionMode.MultiExtended, the TreeCellRenderer is derived from TextBoxCellRenderer, the indent of a treenode is viewed simply setting style.BorderMargins.Left and I paint the +- images before the TextBox''s left margin. Problem is, that clicking on the +- image doesn''t always trigger OnClick() event: if the row is selected, I must click 2 times but if I wait on the row, the cursor transforms to "mousearrow + rectangle" (denoting StartDrag???) and in this case I must click 3 times in order to have an OnClick() event. Help!

Administrator [Syncfusion]
Replied On June 20, 2005 05:52 AM

That sample uses the renderer.OnMouseDown to manage the click on the cell. Have you using that method to manage your +/- click?

Administrator [Syncfusion]
Replied On June 20, 2005 09:20 AM

No, the sample uses the OnMouseClick() event. OnMouseDown() is used for the right button (to view the context menu). (Interestingly for the left button the OnMouseDown() method won''t be called in the sample!) Now I''ve found that the Drag&Drop logic of GridControl swallows this event. If I (and the sample does it!) set Me.ControllerOptions = (Me.ControllerOptions And Not (GridControllerOptions.OleDataSource)) then everything worx fine!


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.