首页 > 技术文章 > supergridcontrol记录

yansc 2018-11-01 13:55 原文

单元格换行:

this.gridColumn2.CellStyles.Default.Alignment = DevComponents.DotNetBar.SuperGrid.Style.Alignment.MiddleCenter;
this.gridColumn2.CellStyles.Default.AllowWrap = DevComponents.DotNetBar.SuperGrid.Style.Tbool.True;

 

superTabControl:

修改标题颜色

 

 

 C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\CSharp\2052

        private void superGridControl1_GetRowCellStyle(object sender, GridGetRowCellStyleEventArgs e)
        {
            if (e.StyleType != StyleType.Default) { return; }

            var row = e.GridRow as GridRow;
            if (row == null) { return; }

            if (((SealupItem)row.DataItem).State == "1")
            {
                e.Style.Background = new Background(Color.Tomato);
            }
        }

  

 

 

推荐阅读