Hey
I figured it out. The DataSource to the ProjectDataBindingSource is a class, not a DataTable
Imports System.ComponentModel
Public Class ProjectData
Public Property _job_id As String
Public Property _name As String
Public Property _thermal_break As String
Public Sub New(ByVal job_id As Integer, ByVal name As String, ByVal thermalbreak As String)
Dim ConvJobID As String = Convert.ToString(job_id.ToString("00000"))
_job_id = ConvJobID
_name = name
_thermal_break = thermalbreak
End Sub
Public Shared Function GetProjectData() As BindingList(Of ProjectData)
Dim JL As JOB.BLL.JobList = New JOB.BLL.JobList
Dim GetList As List(Of JOB.BLL.JobList_details) = JL.GetJobListByAll()
Dim List As BindingList(Of ProjectData) = New BindingList(Of ProjectData)
For Each row As JOB.BLL.JobList_details In GetList
List.Add(New ProjectData(row._job_id, row._name, row._thermal_break))
Next
Return List
End Function
End Class
Then in my form, i bind a Grid & some TextBoxes to the relavent BindingSourse fields.
Finally , to return the hidden column values in code, i use this
Dim t As ProjectData = CType(projectDataBindingSource.Current, ProjectData)
Which provides access to the ProjectData members
Dim _ID As String = t. _job_id
Dim _Name As String = t._name
Dim _TB As String = t._thermal_break