views:

657

answers:

2

Thanks in advance,

I am trying to iterate over a datagrid in Silverlight 3.

I need to walk thru all items, or just the selected items and pull some of the column data so I can do an updates in my database.

So in a button click event I have been trying foreach loops but can't find the right combination.

Thanks, Rich

A: 

I think I got it:

            foreach (var Item in gridExcludedPOGSList.SelectedItems)
            {

                ExcludePOGSList pogList = (ExcludePOGSList)Item;
                accountNumber = pogList.AccountNumber.ToString();
                key_Id = pogList.Key_Id.ToString();

            }

Hope it helps someone else.

Rich

A: 

Thank you it was really helpful!

Max

Max