This is a migrated thread and some comments may be shown as answers.

How can I disable hot tracking from column header elements?

3 Answers 235 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Raymond
Top achievements
Rank 1
Raymond asked on 28 Dec 2010, 01:37 PM
Hi

    How can I disable hot tracking from column header elements?

Regards

3 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 28 Dec 2010, 11:51 PM
Hello Raymond,

this will stop any mouse over effect for the column headers
Private Sub RadGridView1_ViewCellFormatting(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles RadGridView1.ViewCellFormatting
    If TypeOf e.CellElement Is GridHeaderCellElement Then
        e.CellElement.DrawFill = False
    End If
End Sub

Hope that helps
Richard
0
Alexander
Telerik team
answered on 29 Dec 2010, 06:15 PM
Hello Raymond,

The hot tracking style of the header cells is defined in the theme you use. Using the Visual Style Builder, you can edit the style of the GridHeaderCellElement (RadGridViewEiement -> TableElement -> GridTableHeaderRowElement -> GridHeaderCellElement) for the MouseOver element state.

A solution which uses code will not work for all themes. You can use Richard's approach for the ControlDefault theme.

Best regards,
Alexander
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
Raymond
Top achievements
Rank 1
answered on 29 Dec 2010, 09:28 PM

This solution is probably enough good for me – I tested this on WinXP and it looks ok – so maybe changing theme will not be needed.

Tomorrow I will see how it looks on W7.

 

Regards

Tags
GridView
Asked by
Raymond
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Alexander
Telerik team
Raymond
Top achievements
Rank 1
Share this question
or