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.
Syncfusion Feedback

Disabling row selection arrow

Thread ID:

Created:

Updated:

Platform:

Replies:

33548 Aug 22,2005 08:37 PM UTC Aug 23,2005 01:56 PM UTC Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 22, 2005 08:37 PM UTC

In our grid, our row header column is a checkbox control (our custom CheckBoxControl with custom renderer and model). Anyway, I want to disable the row selection arrow. To do that, I tried overriding OnHitTest and simply setting Cursor.Current = Cursors.Arrow; This works except if you check the checkbox, then the mouse leaves the checkbox control and then comes back over the checkbox control, OnHitTest is no longer being called and the cursor reverts to the row selection arrow. How can I disable the row selection arrow properly? Thanks. Pete

Administrator [Syncfusion]
Replied On August 22, 2005 08:57 PM UTC

Try setting grid.BaseStyleMap["Row Header"].StyleInfo.CellType = "Header"; This should change the row header cell type from CellType = "RowHeaderCell" to CellType= "Header" which should lose the triangle.

Administrator [Syncfusion]
Replied On August 23, 2005 01:04 PM UTC

>Try setting > >grid.BaseStyleMap["Row Header"].StyleInfo.CellType = "Header"; > >This should change the row header cell type from CellType = "RowHeaderCell" to CellType= "Header" which should lose the triangle. Clay, Actually, we''re using a custom CellType for those cells. It''s a "CheckBoxHeader" CellType. This CellType is associated with a renderer and model that are derived, eventually, from GridCellRenderer and GridCellModel via our own CheckBoxRenderer and CheckBoxLabelModel classes. Even for our grids which don''t use the checkbox row headers, the "Row Header" style is modified to use our own "GridRowHeader" CellType whose models and renderers are derived from our own HeaderCellRenderer and HeaderCellModel classes which in turn are derived from GridCellRenderer and GridCellModel. Pete

Administrator [Syncfusion]
Replied On August 23, 2005 01:36 PM UTC

I think I misunderstood your question. Sorry. Try setting this.gridDataBoundGrid1.AllowSelection &= ~GridSelectionFlags.Row; to see if this gets rid of that cursor for you. If you still want to select the row, you can catch the click and explicitly select it calling grid.Selections.Select.

Administrator [Syncfusion]
Replied On August 23, 2005 01:56 PM UTC

Clay, Super, that fixed it. Actually, we didn''t need the RowSelection flag because we''re using the checkbox for selection in this case. Thanks. As always, you guys are a huge help. Pete

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.

Warning Icon 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.Close Icon

;