zoukankan      html  css  js  c++  java
  • GridControl应用

    一 绑定

    1.绑定动态图片

     #region 方法:设置图片列(图片+文字)
            public static void SetColumnToPicture(DevExpress.XtraGrid.Views.Grid.GridView gridView)
            { 
               ImageList imgList = new ImageList();  
              imgList.TransparentColor = Color.Transparent;  
              imgList.ImageSize = new Size(16, 16);  
              imgList.ColorDepth = ColorDepth.Depth32Bit;
    
              Image img0 = Properties.Resources.Retina_Ready_24px_1142019_easyicon_net;       
              Image img1 = Properties.Resources.Hourglass_24px_1102301_easyicon_net;
              Image img2 = Properties.Resources.Success_24px_1194837_easyicon_net;
              imgList.Images.Add("0", img0);  
              imgList.Images.Add("1", img1);  
              imgList.Images.Add("2", img2);          
      
              RepositoryItemImageComboBox riImgCmb = new  RepositoryItemImageComboBox();  
             riImgCmb.Items.AddRange(new ImageComboBoxItem[]
             {  
                   new ImageComboBoxItem("待 上 传",0,0),  
                   new ImageComboBoxItem( "已 上 传" ,1,1),                                                                      
                   new ImageComboBoxItem("已 提 交",2,2),              
             }); 
              riImgCmb.SmallImages = imgList;
              gridView.Columns["UploadStatus"].ColumnEdit = riImgCmb;     
            }
            #endregion

    2.绑定动态:repositoryItemPopupContainerEdit

    二.编辑表格

      编辑表格其实是对数据源的操作,所以如需编辑必定要有数据源,哪怕是空表。

      #region 方法:创建空表(待上传Dt)
            public static DataTable CreateDtForWaitUpload()
            {
                DataTable dt = new DataTable();
                dt.Columns.AddRange(
                 new DataColumn[]
                 {                   
                       new DataColumn("ID",typeof(string)),
                        new DataColumn("FilePath",typeof(string)),
                        new DataColumn("FileName",typeof(string)),
                        new DataColumn("UploadTypeName",typeof(string)),
                        new DataColumn("FileSize",typeof(string)), 
                        new DataColumn("FileContent",typeof(byte[])),
                         new DataColumn("UploadStatus",typeof(int)), 
                         new DataColumn("UploadStatusImage",typeof(Byte[])),
                          
                    }
                       );
                return dt;
            }
            #endregion
  • 相关阅读:
    OGG常用命令
    postgres psql常用命令学习笔记
    oracle DG搭建方式两种总结
    配置rhel系统kdump安装RHEL的debuginfo软件包
    oracle开机自启,监听自启,任意秒crontab
    cx_Oracle.DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded 解决方法
    rhel | centos7上配置python3环境和pip
    shared_pool知识点整理
    记一次性能测试实践3-单接口压测
    我是如何做性能测试-文档收集并深入学习
  • 原文地址:https://www.cnblogs.com/mamaxiaoling/p/8257000.html
Copyright © 2011-2022 走看看