F
Fred Nelson
I have a stored procedure that returns a one row with large number of
columns (350) to a datagrid "datagrid1" on a web form:
datagrid1.datasource = getcase.getcaseinfo(case#)
datagrid1.databind()
This operation works and it shows the colum name and the value in a table
format.
Once bound I can read the data grid - for example the following code returns
the value in the first column of the first (and only) row:
dim dgitem as DataGridItem = DataGrid1.Items(0)
dim colcnt as integer = dgitem.cells.count
tbxResult.text = "There are " + colcnt + " Colums in the DataGrid "
tbxResult.text += "The value of the first column is: " +
dgitem.cells(0).text.tostring
I would like to obtain the column names and hopefully the data types (eg:
Integer/ Character) for other uses within the program.
For example:
tbxResult += "The first column name is: " + dgitem.cell(0).NAME
tbxResult += "The Data Type is: " + dgitem.cell(0).DATATYPE
Then I would have the Name, Data Type, and value of each item.
Does anyone know a way to do this?
Your help would be greatly appreciated!
Thanks,
Fred
columns (350) to a datagrid "datagrid1" on a web form:
datagrid1.datasource = getcase.getcaseinfo(case#)
datagrid1.databind()
This operation works and it shows the colum name and the value in a table
format.
Once bound I can read the data grid - for example the following code returns
the value in the first column of the first (and only) row:
dim dgitem as DataGridItem = DataGrid1.Items(0)
dim colcnt as integer = dgitem.cells.count
tbxResult.text = "There are " + colcnt + " Colums in the DataGrid "
tbxResult.text += "The value of the first column is: " +
dgitem.cells(0).text.tostring
I would like to obtain the column names and hopefully the data types (eg:
Integer/ Character) for other uses within the program.
For example:
tbxResult += "The first column name is: " + dgitem.cell(0).NAME
tbxResult += "The Data Type is: " + dgitem.cell(0).DATATYPE
Then I would have the Name, Data Type, and value of each item.
Does anyone know a way to do this?
Your help would be greatly appreciated!
Thanks,
Fred