473,396 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DataGrids and obtaining information from them

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
Nov 20 '05 #1
0 989

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin | last post by:
Dear Group Sorry for posting this here. I'm desperate for a solution to this problem and thought some of you might have come across it with .NET and SQL Server. Let's assume I've the following...
0
by: Lennart Hoglund | last post by:
Uploading an Image to a Server using the method described in the Knowledge Base article Q315832, works fine and smoothly. Obtaining the Image Size using; ImageSize.Text = New...
4
by: mark | last post by:
i have datagrids set out as such on a webform with vb behind datagrid1 datagrid2 datagrid3 datagrid4 datagrid5 datagrid6 datagrid7
0
by: sJeev via DotNetMonster.com | last post by:
Please help, I am very new to asp.net and data grids have got me stuck for a loooong time. I can either have the right content in my datagrids or make them editable. In the first case, I make...
1
by: Simon Harris | last post by:
Hi All, I wish to populate more than one datagrid from the same OleDBCommand. The code I have is: Dim objCmd As New OleDbCommand(strSql, objConn) Then... ...
1
by: keys4worship | last post by:
Here goes... I am very new to programming. I am currenting using Visual Studio C# to connect to SQL db. The db has only one table and two views. I have created 3 datagrids on one page along with 3...
4
by: ree32 | last post by:
I have a placeholder and depending on a user input(a drop downlist) when the user clicks a button I dynamically create a number of datagrids and fill them with data from a database. But the problem...
3
by: Conrad F | last post by:
Hello All, I know how to import a specific named excel sheet into a datagrid using ADO.NET by setting up a JET connection and then SELECTing data from the sheet. However, for a real world...
1
by: Fred Nelson | last post by:
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#)...
7
by: Ausclad | last post by:
Ok, ill try again..... It seems fairly simple. I have two combo boxes in a datagrid. The datagrid is bound to a a table in a dataset. The two combo boxes are bound to a single data table...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.