热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Ext.Net1.x_Ext.Net.GridPanel合并列头与动态修改列头

合并表头:<View><ext:GroupingView><HeaderGr

合并表头:

              
        
               
                       
                              
                                  
                                   
                                   
                                   
                                   
                                   
                                   
                                   
                                   
                                   
                                   
                                   
                                   
                               
                        
                 
          
   


动态修改列头:

    private void ReSetColumnHeader(GridPanel GP) 
    {
        string year = System.DateTime.Now.Year.ToString();
        string last = (System.DateTime.Now.Year -1).ToString();
        this.GPSales.ColumnModel.SetColumnHeader(2, last);
        this.GPSales.ColumnModel.SetColumnHeader(3, year);
        this.GPSales.ColumnModel.SetColumnHeader(4, last);
        this.GPSales.ColumnModel.SetColumnHeader(5, year);
        this.GPSales.ColumnModel.SetColumnHeader(6, last);
        this.GPSales.ColumnModel.SetColumnHeader(7, year);
        this.GPSales.ColumnModel.SetColumnHeader(8, last);
        this.GPSales.ColumnModel.SetColumnHeader(9, year);
        this.GPSales.ColumnModel.SetColumnHeader(10, last);
        this.GPSales.ColumnModel.SetColumnHeader(11, year);
        this.GPSales.ColumnModel.SetColumnHeader(12, last);
        this.GPSales.ColumnModel.SetColumnHeader(13, year);
        this.GPSales.ColumnModel.SetColumnHeader(14, last);
        this.GPSales.ColumnModel.SetColumnHeader(15, year);
        this.GPSales.ColumnModel.SetColumnHeader(16, last);
        this.GPSales.ColumnModel.SetColumnHeader(17, year);
        this.GPSales.ColumnModel.SetColumnHeader(18, last);
        this.GPSales.ColumnModel.SetColumnHeader(19, year);
        this.GPSales.ColumnModel.SetColumnHeader(20, last);
        this.GPSales.ColumnModel.SetColumnHeader(21, year);
        this.GPSales.ColumnModel.SetColumnHeader(22, last);
        this.GPSales.ColumnModel.SetColumnHeader(23, year);
        this.GPSales.ColumnModel.SetColumnHeader(24, last);
        this.GPSales.ColumnModel.SetColumnHeader(25, year);
    }

效果:


推荐阅读
author-avatar
Yomon-00
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有