zoukankan      html  css  js  c++  java
  • DGV单元格合并标题(dgv封装)

    1.效果图

    2.实现代码

      List<GridColumn> columns = new List<GridColumn>();
                columns.Add(new GridColumn() { Caption = "使用人", ParentGroupKey = "使用", DataType = typeof(string), Field = nameof(ChgRcptStatisticalVo.UserName), Visible = true, Width = 100 });
                columns.Add(new GridColumn() { Caption = "正常", ParentGroupKey = "使用", DataType = typeof(string), Field = nameof(ChgRcptStatisticalVo.NormalSum), Visible = true, Width = 100 });
                columns.Add(new GridColumn() { Caption = "重打", ParentGroupKey = "使用", DataType = typeof(string), Field = nameof(ChgRcptStatisticalVo.NormalReTypeSum), Visible = true, Width = 100 });
                columns.Add(new GridColumn() { Caption = "报损", ParentGroupKey = "使用", DataType = typeof(string), Field = nameof(ChgRcptStatisticalVo.NormalBreakdownSum), Visible = true, Width = 100 });
                columns.Add(new GridColumn() { Caption = "总数", ParentGroupKey = "使用", DataType = typeof(string), Field = nameof(ChgRcptStatisticalVo.UseSum), Visible = true, Width = 100 });
                columns.Add(new GridColumn() { Caption = "作废", ParentGroupKey = "收回", DataType = typeof(string), Field = nameof(ChgRcptStatisticalVo.RecycleInvalidSum), Visible = true, Width = 100 });
                columns.Add(new GridColumn() { Caption = "重打", ParentGroupKey = "收回", DataType = typeof(string), Field = nameof(ChgRcptStatisticalVo.RecycleRetypeSum), Visible = true, Width = 100 });
                columns.Add(new GridColumn() { Caption = "总数", ParentGroupKey = "收回", DataType = typeof(string), Field = nameof(ChgRcptStatisticalVo.RecoverySum), Visible = true, Width = 100 });
                dgvMain.InitColumns(columns);
  • 相关阅读:
    from import 的认识
    模块初识
    eq方法
    hash介绍
    item系列
    析构函数
    serializers进阶
    APIView源码解析
    RPC协议
    面试题补充
  • 原文地址:https://www.cnblogs.com/yuanshuo/p/14529603.html
Copyright © 2011-2022 走看看