Silverlight 3 - How to iterate over a datagrid
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
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
精彩评论