Author: KyD | Posted on: 1/26/2010 2:32:20 PM | Views : 242

I have function GetCustomMadeDataTable.  I am trying to read row 2 of the table into listbox4.
function codes:
Public Function GetCustomMadeDataTable() As System.Data.DataTable 'Create a new DataTable object Dim objDataTable As New System.Data.DataTable 'Create three columns with string as their type objDataTable.Columns.Add("Column 1", String.Empty.GetType()) objDataTable.Columns.Add("Column 2", String.Empty.GetType()) objDataTable.Columns.Add("Column 3", String.Empty.GetType()) 'Adding some data in the rows of this DataTable objDataTable.Rows.Add("pear") objDataTable.Rows.Add("apple") objDataTable.Rows.Add("zebra") Return objDataTable End Function
 
 
 
Call codes

 Go to the complete details ...