开发者

Silverlight 3 - How to iterate over a datagrid

开发者 https://www.devze.com 2022-12-10 00:38 出处:网络
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 da

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

0

精彩评论

暂无评论...
验证码 换一张
取 消