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

Disabling row selection arrow

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

4 Replies

AD Administrator Syncfusion Team 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.


AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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.


AD Administrator Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon