摘要:
XAML页面:<Grid x:Name="LaoutRoot"><StackPanel Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" Orientation="Horizontal"> <TextBlock Text="书籍名称" Width="50" VerticalAlignment="Center... 阅读全文
摘要:
今天在做一个小的DEMO时,群里有位哥们问到了如何获取当前选中的datagrid的行数据,顺便测试了一下,发现SL的方式要比ASPX的方便很多!并且如果你绑定的数据是Entity的话,那么你可以根据你当前选中的datagrid获取到这个Entity,下面把代码贴上。注意触发的事件为:CurrentCellChanged后台代码:/// <summary> /// 获取datagrid当... 阅读全文