G
Guest
I have the following code which allows me to display records from a table
named "lkup_Specie" in a datagrid. If I create a second datatable and a
second hashtable for a table named "lkup_Grade", how would I incorporate that
logic into my existing logic? Would it go after Next statement? Thanks.
Protected specieDataTable As New DataTable 'BEING USED OK
Protected specieHashTable As New Hashtable 'BEING USED OK
Protected cutDataTable As New DataTable 'NEED TO INCORPORATE THIS
Protected cutHashTable As New Hashtable 'NEED TO INCORPORATE THIS
Dim adapter As New SqlDataAdapter("SELECT * FROM lkup_Specie",
SQLConnection1)
adapter.Fill(specieDataTable)
'Also populate a Hashtable, which is easier for the databinding
expression.
Dim dr As DataRow
For Each dr In specieDataTable.Rows
specieHashTable.Add(dr("SpecieID"), dr("Specie"))
Next
named "lkup_Specie" in a datagrid. If I create a second datatable and a
second hashtable for a table named "lkup_Grade", how would I incorporate that
logic into my existing logic? Would it go after Next statement? Thanks.
Protected specieDataTable As New DataTable 'BEING USED OK
Protected specieHashTable As New Hashtable 'BEING USED OK
Protected cutDataTable As New DataTable 'NEED TO INCORPORATE THIS
Protected cutHashTable As New Hashtable 'NEED TO INCORPORATE THIS
Dim adapter As New SqlDataAdapter("SELECT * FROM lkup_Specie",
SQLConnection1)
adapter.Fill(specieDataTable)
'Also populate a Hashtable, which is easier for the databinding
expression.
Dim dr As DataRow
For Each dr In specieDataTable.Rows
specieHashTable.Add(dr("SpecieID"), dr("Specie"))
Next