Hi All, I am loading a WinComboBox with a dataset returned from SQL Server with the following code:
“SELECT RecordID, WeekEnding, Posted FROM tblWeekEnding”
…
For Each pdrDataRow As DataRow In pdsWeekEnding.Tables(“tblWeekEnding”).Rows
pdtPosted = pdrDataRow(“WeekEnding”)
If pdrDataRow(“Posted”) Then
cboWeekEnding.Items.Add(pdrDataRow(“RecordID”).ToString, pdtPosted.ToString(“MM/dd/yyyy”), “Posted”)
Else
cboWeekEnding.Items.Add(pdrDataRow(“RecordID”).ToString, pdtPosted.ToString(“MM/dd/yyyy”), “”)
End If
Next
In the properties of the WinComboBox I have 3 columns (colRecordID, colWeekEnding, and colPosted”) and I have set the column colRecordID to Visible=False. The WinComboBox loads fine and displays fine. I can also select items in the WinComboBox.
What I cant figure out is how to get the value in the RecordID column which is invisible after a selection is made.
Any help?
Thanks a million,
Roy
Imported from legacy forums. Posted by Roy (had 2133 views)