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

OnClick event swallowed

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!

2 Replies

AD Administrator Syncfusion Team June 20, 2005 04:52 AM

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


AD Administrator Syncfusion Team June 20, 2005 08: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!

Loader.
Live Chat Icon For mobile
Up arrow icon