13719654321 发表于 2015-9-22 08:35:46

SAP 8.81 SDK Matrix 与Grid 如何实现对cell设定颜色及只读属性

  SBO 8.81 可以实现对Matrix 与Grid 如何实现对cell设定颜色及只读属性

  通过SAPbouiCOM.CommonSetting可以对Cell来设定。

  

oMatrix = (SAPbouiCOM.Matrix)(oForm.Items.Item("mtx").Specific);
                  SAPbouiCOM.CommonSetting oCommonSetting = oMatrix.CommonSetting;
                  for (int i = 1; i <= oMatrix.RowCount; i++)
                  {
                        if (Common.ConvertHelper.ToDateTime(((SAPbouiCOM.EditText)(oMatrix.Columns.Item(8).Cells.Item(i).Specific)).String) < System.DateTime.Now)
                        {
                            oCommonSetting.SetCellFontColor(i, 8, Common.Common.ColorTranslatorToOle(System.Drawing.Color.Red));
                        }
                  }  以上代码实现对Cell颜色区分。
  
  详情见SDK

  

Public Methods

http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif GetCellBackColor Returns the background color of a cell ina matrix or a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif GetCellEditable Returns the information as to whether acell is editable. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif GetCellFontColor Returns the font color of a cell in amatrix or a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif GetCellFontSize Returns the font size of a cell in amatrix or a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif GetCellFontStyle Returns the font style of a cell in amatrix or a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif MergeCell Merge cells in a row, from the first oneyou want until the last one you want.  The text displayed in a merged cell is the content from the firstcell.
http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SeparateLine The separation line between tworows. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SetCellBackColor Updates the background color of a cell ina matrix or a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SetCellEditable Sets the flag for whether a cell iseditable. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SetCellFontColor Updates the font color of a cell in amatrix or a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SetCellFontSize Updates the font size of a cell in amatrix or a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SetCellFontStyle Updates the font style of a cell in amatrix or a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SetRowBackColor Updates the background color of a row in amatrix or a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SetRowEditable Sets the flag for whether a row iseditable. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SetRowFontColor Updates the font color of a row in amatrix or a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SetRowFontSize Updates the font size of a row in a matrixor a grid. http://www.cnblogs.com/el-net/admin/aximages/PublicMethod.gif SetRowFontStyle Updates the font style of a row in amatrix or a grid.   
  
页: [1]
查看完整版本: SAP 8.81 SDK Matrix 与Grid 如何实现对cell设定颜色及只读属性