Referencing Datagrid Information

  • Thread starter Thread starter tjonsek
  • Start date Start date
T

tjonsek

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.
 
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
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top