• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

getting fields from a list<>

I have a list and it returns the data I need to fill a grid - but now I need to forward that information to a new page using stubs - I can do that but I cant figure out how to get the information from the list

            MyData.QC q = new MyData.QC();
            List<MyData.QCData> data = new List<MyData.QCData>();
            data = q.GetAllOpen(linekey, sample, tuid);
                foreach(string d in data)
                {
                MessageBox.Show(d);
                }

Open in new window

this doesnt work  - the error is cannot convets list to string - I could use the help if anyone knows - Thanks R
0
r3nder
Asked:
r3nder
1 Solution
 
käµfm³d 👽Commented:
You have a list of MyData.QCData, yet you are attempting to iterate over it as if it were a list of string. See the discrepancy there? Try:

foreach(MyData.QCData d in data)
{
    MessageBox.Show(d.SomePropertyOfQCDataClass);  // change accordingly
}

Open in new window

0
 
r3nderAuthor Commented:
Thanks K
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now