Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referring to DataTable column values
Message
From
30/08/2011 10:43:51
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Referring to DataTable column values
Miscellaneous
Thread ID:
01522272
Message ID:
01522272
Views:
71
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
Next
Reply
Map
View

Click here to load this message in the networking platform