Ok, I need to beable to create something that has two collums and add data to the collums. I do not need to connect to an outside but just put data from a text box into a collum. Does anyone know how to do this.
Jeremy
Printable View
Ok, I need to beable to create something that has two collums and add data to the collums. I do not need to connect to an outside but just put data from a text box into a collum. Does anyone know how to do this.
Jeremy
VB Code:
Dim SampleDataSet As DataSet, Table As DataTable SampleDataSet = New DataSet("SampleDataSet") Table = New DataTable("Table") SampleDataSet.Tables.Add(Table) Dim myDataColumn As DataColumn Dim myDataRow As DataRow myDataColumn = New DataColumn() myDataColumn.ColumnName = "1st" Table.Columns.Add(myDataColumn) myDataColumn.ReadOnly = True myDataColumn.DataType = System.Type.GetType("System.Decimal") myDataColumn = New DataColumn() myDataColumn.ColumnName = "2nd" Table.Columns.Add(myDataColumn) myDataColumn.ReadOnly = False myDataColumn.DataType = System.Type.GetType("System.Single") For x = 0 To (EndofFile - 1) myDataRow = Table.NewRow myDataRow("1st") = var1(x) myDataRow("2nd") = var2(x) Table.Rows.Add(myDataRow) Next Me.DataGrid1.SetDataBinding(SampleDataSet, "Table")