开发者

How to manipulate à DataGrid in Silverlight 3

I having trouble to manipulate CeLLs content in Silverlight Grids... I can get my DataGrid, the Columns but not the Cell value.

How can I get the first Cell wich is an Image in a Button for every row?? I can only achieve my goal by even开发者_运维知识库ts like the button_click but not in regulare code behind.

thanks for help


You can use DataGrid.SelectedItem property and cast record to your desired object.

Customer c = GrdCustomers.SelectedItem as Customer;
if (c != null)
{
    string customerId = c.CustomerID;
}

assuming you have your datasource as Customer.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜