Hey all I was just wondering if anyone is familar with getting the distinct value from a DB using this method? I have the code written but it is not giving me any distinct values.
this is what I have so far, it does work and it populates the tree view, but it has data that is repeated over again. I would like to only show one, each of the nodes leads to different pages, but this is for an online help, so while it has different sections, all the content pretty much mean the same, First Name is First Name no matter where you go.
Private Sub BuildListView()
Dim dsCategories As DataSet
dsCategories = GetCategories(GetLanguage)
Dim dv As New DataView(dsCategories.Tables("Categories"))
dv.Sort = "CATEGORY_NAME"
dv.RowFilter = "ISNULL(AD_HELP_CONTENT_ID,0)<>0"
Dim newTable As DataTable = dv.ToTable(True, "CATEGORY_NAME", "AD_HELP_CATEGORY_ID")
'There are no child nodes for this tree
'Load the base nodes
Dim node As TreeNode
Dim rowView As DataRow
For Each rowView In newTable.Rows
node = New TreeNode(CStr(rowView("CATEGORY_NAME")), CStr(rowView("AD_HELP_CATEGORY_ID")))
node.SelectAction = TreeNodeSelectAction.SelectExpand