473,406 Members | 2,698 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,406 software developers and data experts.

Datagrid - pulling a cell value from a column - Any help would be GREATLY appreciated.

I have a question. I have some data that I am pulling into a dataset
that needs to have each row of data emailed out. I got the email
funciton working great but its extracting that data that is becoming
the problem. I assume it would be in a loop, and to do that I am
guessing something like this:

for each item in dataset
extact row
email rowinfo
for next

(my theoritical coding practices, pardon me :)

Does anyone have an idea how i can do this?

Dim i As Integer
Dim strContainerID As String
Dim num As Integer =
Me.BindingContext(dgNewContainer.DataSource).Count
strContainerID = num

lblToday.Text = strContainerID
--->>> I want to pull a cell value out of a column to email it here
For i = 0 To num - 1
Next
End Sub
Jul 21 '05 #1
2 1609

I'm guessing you are binding a specific data table from that dataset,
and would like to interate over only the rows in that table.
The way to do this is to simply go over the specific table tows and
columns like so:

for each row as DataRow in ds.table(0).Rows
for each col DataColumn in ds.tables(0).Columns
dim currentRowCell as String = row(col.Name).Value
'do whatever you like with this value
next

next

On 5 Nov 2003 11:57:23 -0800, sh*****@ensafe.com (PuckInLA) wrote:
I have a question. I have some data that I am pulling into a dataset
that needs to have each row of data emailed out. I got the email
funciton working great but its extracting that data that is becoming
the problem. I assume it would be in a loop, and to do that I am
guessing something like this:

for each item in dataset
extact row
email rowinfo
for next

(my theoritical coding practices, pardon me :)

Does anyone have an idea how i can do this?

Dim i As Integer
Dim strContainerID As String
Dim num As Integer =
Me.BindingContext(dgNewContainer.DataSource).Coun t
strContainerID = num

lblToday.Text = strContainerID
--->>> I want to pull a cell value out of a column to email it here
For i = 0 To num - 1
Next
End Sub


---
Regards,

Roy Osherove
www.iserializable.com
Jul 21 '05 #2
if you just need to get the CURRENT selected row from a bound
datagrdi, there's a more elegant way:
http://weblogs.asp.net/rosherove/story/9088.aspx
On 5 Nov 2003 11:57:23 -0800, sh*****@ensafe.com (PuckInLA) wrote:
I have a question. I have some data that I am pulling into a dataset
that needs to have each row of data emailed out. I got the email
funciton working great but its extracting that data that is becoming
the problem. I assume it would be in a loop, and to do that I am
guessing something like this:

for each item in dataset
extact row
email rowinfo
for next

(my theoritical coding practices, pardon me :)

Does anyone have an idea how i can do this?

Dim i As Integer
Dim strContainerID As String
Dim num As Integer =
Me.BindingContext(dgNewContainer.DataSource).Coun t
strContainerID = num

lblToday.Text = strContainerID
--->>> I want to pull a cell value out of a column to email it here
For i = 0 To num - 1
Next
End Sub


---
Regards,

Roy Osherove
www.iserializable.com
Jul 21 '05 #3

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

Similar topics

2
by: PAUL GROSSMAN | last post by:
Hello everyone. I am working with a DataGrid using VB .Net (Windows Forms). I want to make one of the columns un-editable. I was able to do that by setting the ...
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
0
by: JL3574 l | last post by:
i have a datagrid with a combo box added in it's columns . the combobox pulls values from a database in it's dropdownlist fashion. my problem is that when i pick a select on the combo box it...
3
by: Sunil Sabir | last post by:
Dear All, I have a datagrid which displays the column of Names of doctors.When I use e.item.cell(5).Text. I see the name of two doctors instead of one.In the database the doctors name are: ...
7
by: CanoeGuy | last post by:
I have been trying for the last two weeks to display a dynamic DataGrid. The data that I'm pulling from a SQL Server DB will have whole columns that will be either NULL or 0. I want to display...
21
by: coleenholley | last post by:
I've been trying since last Friday to get an answer on how to get a SPECIFIC row.cell value from a datagrid. I've had plenty of suggestions, but nothing works to get the value from a SPECIFIC Row...
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...
4
by: Anthony | last post by:
Hi Folks, I'm adding some columns to my datagrid which are of Combo Box type. I'm inheriting DataGridTextBoxColumn and doing all the usual stuff to get them populated. This is working fine. I...
2
by: PuckInLA | last post by:
I have a question. I have some data that I am pulling into a dataset that needs to have each row of data emailed out. I got the email funciton working great but its extracting that data that is...
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: 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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.