Hi Gary,
Sorry for the delayed responce.
Regarding sorting, the problem is that now the dates are presented as strings and the are sorted as strings.
To fix this you should create a new class that represent short formatted date item and also you should made small modifications of the class that you create earlier.
The new class should looks like this:
Public Class NTreeListNodeShortDateTimeSubItem
Inherits NTreeListNodeDateTimeSubItem
Public Overrides ReadOnly Property DisplayValue() As String
Get
Return CDate(Value).ToShortDateString()
End Get
End Property
End Class
and now MyNTreeListTableData should looks like the following:
Public Class MyNTreeListTableData
Inherits NTreeListTableData
Protected Overrides Function CreateSubItem(ByVal value As Object) As Nevron.UI.WinForm.Controls.NTreeListNodeSubItem
Dim item As NTreeListNodeSubItem = MyBase.CreateSubItem(value)
If value.GetType() Is GetType(DateTime) Then
item = New NTreeListNodeShortDateTimeSubItem()
TryCast(item, NTreeListNodeShortDateTimeSubItem).Value = value
End If
Return item
End Function
End Class
These changes should fix the sorting problem.
Sorry that I didn't foresee it at the beginning.
Regarding selection retrieving you should attach to ItemNotify event and check for the appropriate notify code.
Again, here is an example:
Private Sub NTreeList1_ItemNotify(ByVal sender As System.Object, ByVal data As NLightUIItemNotifyData) Handles NTreeList1.ItemNotify
If data.NotifyCode = NTreeList.ItemLabelDoubleClickNotifyCode Then
MessageBox.Show(TryCast(data.Sender, NTreeListNode).SubItems(0).RawData)
End If
End Sub
The drawback here is that you cannot determine on which column is clicked, so you have to know which columns data you want to retreve. At the example above this should be the first one (SubItems(0)).
I hope this will helps.
Along with the documentation you can check the example application provided in the instalation that shows how to use the most common functionality of our UI controls.
Regards,
Angel.