- 博客(3)
- 资源 (1)
- 收藏
- 关注
原创 WPF TREEGRID,一种绑定至类中的可变的DataRow中的列的方法
Classs TreeGrid{ int Level,string Parent,string Child,DataRow Value},想在一个 DataGrid 中呈现树形的可变的DataRow数据。实现通过调用C#代码对可变的实体数据进行动态绑定。"Value[" + column.ColumnName+"]" 可实现 对DataRow中的列“ColumnName”与Class类中的属性“PropertyName”同样的效果。
2023-03-10 21:33:50
435
原创 WPF XAML 自定义ComboBox 实现选择 带方向箭头的链接线条
代码如下:<ComboBox Name="combox2" Width="120" Margin="5 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Left" Background="White" SelectedIndex="0" Height="20"> <ComboBoxItem Margin="0 5 0 5"> ...
2021-05-21 15:35:39
616
原创 C# 用 Expression 筛选DataTable 列值为空(null) 的方法
经测试,用判断 x.Field(columnName) 等于 DBNull.Value 或 null 或 ToString() 为 Empty 等等 都不成功。以下是 可行的 方法,调用 DataRow.IsNull(columnName)var param = Expression.Parameter(typeof(T), "x");MethodInfo IsNullmethInfo = typeof(System.Data.DataRow).GetMethod("IsNull", new .
2021-04-28 15:31:25
1759
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人