Adding a new column and values into a dataset

  • Thread starter Thread starter Do
  • Start date Start date
D

Do

Hi,

I have a dataset that returns values.
I have done some calculation and

1) want to set the results into a label
that I have put into an itemtemplate in a datagrid.

2) Or just set the values to a new column in the existing dataset
and use that data for my datagrid

How do I go about doing this?

Do
 
Hi,

1) add column :
DBColumn = New DataColumn()
DBColumn.ColumnName = "ItemValue"
DBColumn.DataType = System.Type.GetType("System.String")
DBTable.Columns.Add(DBColumn)

2) loop through rows and set new column data.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 
Hi,

1) add column :
DBColumn = New DataColumn()
DBColumn.ColumnName = "ItemValue"
DBColumn.DataType = System.Type.GetType("System.String")
DBTable.Columns.Add(DBColumn)

2) loop through rows and set new column data.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 
Back
Top