开发者

How to manipulate à DataGrid in Silverlight 3

开发者 https://www.devze.com 2022-12-27 03:41 出处:网络
I having trouble to manipulate CeLLs content in Silverlight Grids... I can get my DataGrid, the Columns but not the Cell value.

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

精彩评论

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