473,396 Members | 2,037 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.

Referencing Datagrid Information

I am using a Datagrid to display a list of names associated with a
record in a database. I am now creating an email capability that would
allow the user to email basic details about the record and the names
associated with this record.

Is there any way to loop through the Datagrid Items and pull the names
so I can build the body of the message?

Your input is appreciated. Also, if you can point me to a good book or
online material that addresses this, I would appreciate it. I've not
found a thoroughly in-depth source online of what I need to know about
using datagrids.

Jan 13 '06 #1
3 904
tj*****@phenom-biz.com wrote:
I am using a Datagrid to display a list of names associated with a
record in a database. I am now creating an email capability that would
allow the user to email basic details about the record and the names
associated with this record.

Is there any way to loop through the Datagrid Items and pull the names
so I can build the body of the message?

Your input is appreciated. Also, if you can point me to a good book or
online material that addresses this, I would appreciate it. I've not
found a thoroughly in-depth source online of what I need to know about
using datagrids.

Windows or Web DataGrid? How are you populating the DataGrid.DataSource
property? The basic concept is simple. Use whatever object you
populated the datasource with, loop through the records and pull the
information out. You can pull the object from the datasource property
itself. For Example if you used a DataTable it would look something like:

Dim myTable as DataTable = DirectCast(DataGrid1.DataSource, DataTable)
For each R as DataRow in DataTable
Debug.WriteLine(R.Items(X).ToString)
Next
Jan 13 '06 #2
It is a web datagrid. I populate it with a dataset. I didn't think of
going directly to the source. That would make sense.

I really like .NET, but there are so many things that used to seem
simple in asp that now seem difficult to do. I've been teaching myself
by only reading things online but I think it's time to break down and
buy a book or convince my boss to send me to training.

Thanks.

Jan 13 '06 #3
tj*****@phenom-biz.com wrote:
It is a web datagrid. I populate it with a dataset. I didn't think of
going directly to the source. That would make sense.

I really like .NET, but there are so many things that used to seem
simple in asp that now seem difficult to do. I've been teaching myself
by only reading things online but I think it's time to break down and
buy a book or convince my boss to send me to training.

Thanks.


They aren't difficult in .Net, they are just different. Just like
learning any new language, it takes time to get up to speed.

Chris
Jan 13 '06 #4

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

Similar topics

2
by: sreddy | last post by:
I am trying to write a sql query on self referencing table. Just to brief ..Database is related to a Hiring department of the Qwest company. I need to generate a Report used by in HR...
3
by: MattB | last post by:
Is there any way to reference a cell in a datagrid's ItemDataBound event by it's DataItem column name (e.item.DataItem("colname")). I need to set a cell's text to "" based on the contents of it's...
3
by: 2obvious | last post by:
I have a DataGrid containing a TextBox control and a CustomValidator in each row. The CustomValidator fires a function that compares all TextBoxes for equality. The algorithm for comparison is...
2
by: Craig | last post by:
How do I reference the dataset row number for the data in the datagrid and not the datagrid row itself when calling a function from the HTML? When I am calling a function from a datagrid column...
3
by: Lyners | last post by:
I have a table within a cell of a datagrid. I am doing updates without postback to the server using Javascript. I have everything working, except referencing a table within the datagrid cell. ...
0
by: ElGordo | last post by:
I've been searching all over and think I am close, but keep getting the error "Index out of range" when trying to reference a nested datagrid when an OnEditCommand event is raised. When the...
0
by: Chris | last post by:
I've been searching all over and think I am close, but keep getting the error "Index out of range" when trying to reference a nested datagrid when an OnEditCommand event is raised. When the...
3
by: tjonsek | last post by:
am working on code that will allow users to update data within the datagrid. I have come across a few problems, some of them I have been able to work out, but this last one is giving me trouble. ...
0
by: Erick | last post by:
I built a windows control which inherits from the windows datagrid class Public Class XDataGrid Inherits System.Windows.Forms.DataGrid Private _AutoSizeDataGrid As Boolean Private...
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?
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
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,...
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
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,...

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.