Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referring to DataTable column values
Message
De
30/08/2011 10:43:51
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Referring to DataTable column values
Divers
Thread ID:
01522272
Message ID:
01522272
Vues:
73
UPDATE: as usually happens, I find the solution within minutes of posting: x = dtReceipts.Rows[0]["PolicyHeaderFK"]

Hi,

this is probably not an MM.NET thing but the project is in MM.NET so I decided to post here.

I've been away from this type of work for a few months and the brain has become rusty. How do I refer to a column value in a DataTable?

I have this code:
            DataSet dsList = (DataSet)Session["Receipt"];
            dtReceipts = (DataTable)dsList.Tables[0];
which shows me the correct data when using the DataSet Visualizer, but how do I get the value of one of the columns in that DataSet or DataTable?

I have tried

x = dtReceipts.Columns["PolicyHeaderFK"]

x = dtReceipts.Rows[0].Columns["PolicyHeaderFK"]

but those don't work.

Can someone give my brain a jump start, please?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform