开发者

How to make silverlight datagrid editable?

开发者 https://www.devze.com 2022-12-31 22:58 出处:网络
I created a simple collection of Person with name, 开发者_运维技巧age and sex where all three fields have getters and setters. I bound the collection to the data grid using the itemssource. I can see

I created a simple collection of Person with name, 开发者_运维技巧age and sex where all three fields have getters and setters. I bound the collection to the data grid using the itemssource. I can see the data been showed up in the data grid but it does not allow me to edit any of the rows. What do I make so that it becomes editable?

Thanks.


Something like this should do the trick...

<sdk:DataGrid ItemsSource="{Binding Person}"
                                  SelectedItem="{Binding SelectedPerson, Mode=TwoWay}"
                                  IsReadOnly="False">
0

精彩评论

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