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

Can not disable Hottracking in Gridview using HTMLViewDefinition

2 Answers 132 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Phuong
Top achievements
Rank 1
Phuong asked on 28 Dec 2010, 03:59 PM
I have a Gridview and using HtmlViewDefinition on it, but i can not disable HotTracking in this Gridview by setting EnableHotTracking to FALSE.
The HotTracking is still active. Can some body help ???

2 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 29 Dec 2010, 12:08 AM
Hello,

I haven't been able to replicate your issue. Below is a vey simple exmaple and HotTracking can be disabled correctly. Can you confirm the version that you are using? For reference I am using the latest Q3 2010 Sp1 release.
Public Class Form1
  
    Private Sub Form1_Load(ByVal sender As System.Object,
                           ByVal e As System.EventArgs) Handles MyBase.Load
  
  
        Dim view As New HtmlViewDefinition()
  
        view.RowTemplate.Rows.Add(New RowDefinition())
        view.RowTemplate.Rows.Add(New RowDefinition())
        view.RowTemplate.Rows(1).Cells.Add(New CellDefinition("Name"))
        view.RowTemplate.Rows(1).Cells.Add(New CellDefinition("Age"))
  
  
        Me.RadGridView1.ViewDefinition = view
  
        Dim people As New BindingList(Of Person)
        people.Add(New Person("Richard", 40))
        people.Add(New Person("Peter", 46))
        people.Add(New Person("Chris", 43))
        people.Add(New Person("Bob", 30))
  
        Me.RadGridView1.DataSource = people
        Me.RadGridView1.EnableHotTracking = False
    End Sub
  
End Class
  
Public Class Person
  
    Public Sub New(ByVal name As String, ByVal age As Integer)
        Me.Name = name
        Me.Age = age
        City = New BindingList(Of String)
        City.Add("London")
        City.Add("Manchester")
        City.Add("Southampton")
    End Sub
  
    Public Property Name As String
    Public Property Age As Integer
    Public Property City As BindingList(Of String)
  
End Class

Hope that helps
Richard
0
Phuong
Top achievements
Rank 1
answered on 29 Dec 2010, 07:25 AM
Thank you Richard.
With your suggest, I have just find out the reason : I set HotTracking to False in design mode and when applying HTMLview, HotTracking is auto turn on.
So  set HotTracking in code can solve the problem.

Thanks again.
Tags
GridView
Asked by
Phuong
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Phuong
Top achievements
Rank 1
Share this question
or