473,386 Members | 1,758 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,386 software developers and data experts.

Text value of DataGrid cell - Webforms

How do you get the text value of a DataGrid in a WebForm? I am doing all of
my DataBinding @ runtime.
Jul 21 '05 #1
1 8958
Try doing the following:

for(int i = 0; i < dataGrid.Items.Count; i++)
{
string foo = dataGrid.Items[i].Cells[column].Text;
// for text in a cell
string foo =
((TextBox)dataGrid.Items[i].Cells[column].Controls[1]).Text; // for text
in a textbox in a cell
}

--
This posting is provided "AS IS" with no warranties, and confers no rights.

Thanks
Shawn Rothlisberger
CLR Performance Test

Jul 21 '05 #2

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

Similar topics

4
by: David Krmpotic | last post by:
Hello, Can please tell me how to do it ? This should be simple, because I'd think it's used a lot.. but in reality is not that simple and there is at least 50 topics about it in newsgroups,...
0
by: Frnak McKenney | last post by:
One of the reasons given for the Allied victory in WWI is that the Nazi armament industry invested so much effort in creating new weapons (e.g. the jet plane) it wasn't able to develop any of them...
4
by: Sam Evans | last post by:
All: I've looked all over (and probably not in the right places) to try and find some example code, or documentation on how I can modify the text in a cell of a datagrid. I've found...
2
by: martin | last post by:
Hi, I am iterating through the dataitems in a datagrid and producing and xml document, If a particular cell in the datagrid has a textbox control or a datagrid control in it then I have no...
3
by: Craig G | last post by:
what way do you code it? i tried the following but it wouldnt display it lblAdd_info is a hidden field in the cell itself that contains the data i want to display in the tooltip text. i added the...
2
by: niceguy | last post by:
Hi I was wondering if its possible to get the exact displayed text from a cell in a datagrid. I need to get the displayed text and not any 'real' database value or anything that the cell...
1
by: jeguillo | last post by:
I am trying to retrieve the text within each cell in a datagrid in order to change the color of each cell, depending on the value within that cell. This works fine on the cells that are bound...
1
by: Eddie B. | last post by:
How do you get the text value of a DataGrid in a WebForm? I am doing all of my DataBinding @ runtime.
2
by: kito | last post by:
I have the following problem. I have a list of products in a Database. Now I would like to list them on a DataGrid, but in a special manner. In the first cell of a row in the DataGrid I would like...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.