コード例 #1
0
        public RecordFieldStylesCollection GetObject(string tableName)
        {
            RecordFieldStylesCollection value = GetRecordFieldStylesByTableName(tableName);

            if (value == null)
            {
                TableRecordFieldStyles obj = new TableRecordFieldStyles();
                obj.TableName = tableName;
                value         = obj.RecordFieldStyles;
                Add(obj);
            }

            return(value);
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: tzvis1/winforms-demos
        /// <summary>
        /// Get the styles through  the fieldname
        /// </summary>
        public GridStyleInfo GetCellStyle(string tableName, object primaryKey, string fieldName)
        {
            RecordFieldStylesCollection recordFieldStyles = TableRecordFieldStyles.GetRecordFieldStylesByTableName(tableName);

            if (recordFieldStyles != null)
            {
                FieldStyleCollection fieldStyles = recordFieldStyles.GetFieldStylesByRecordKey(primaryKey);
                if (fieldStyles != null)
                {
                    return(fieldStyles.GetStyleByFieldName(fieldName));
                }
            }
            return(null);
        }
コード例 #3
0
        //used to initialize the custom styles to the GridGroupingControl
        private void buttonAdv1_Click(object sender, EventArgs e)
        {
            this.gridGroupingControl1.Appearance.AnyCell.ImageSizeMode = GridImageSizeMode.CenterImage;
            this.gridGroupingControl1.IntelliMousePanning = true;

            GridTable           employeeTable           = this.gridGroupingControl1.Table;
            GridTableDescriptor employeeTableDescriptor = this.gridGroupingControl1.TableDescriptor;

            RecordFieldStylesCollection employee = TableRecordFieldStyles.GetObject(this.gridGroupingControl1.TableDescriptor.Name);

            employee.GetObject(2).GetObject("LastName").BackColor = ColorConvert.ColorFromString("#84A1C3");
            employee.GetObject(2).GetObject("LastName").Font.Bold = true;
            employee.GetObject(1).GetObject("City").BackColor     = ColorConvert.ColorFromString("#FF9933");;
            employee.GetObject(1).GetObject("City").Font.Italic   = true;
            employee.GetObject(1).GetObject("Address").Interior   = new BrushInfo(PatternStyle.OutlinedDiamond, ColorConvert.ColorFromString("#84A1C3"), ColorConvert.ColorFromString("#2a437e"));
            employee.GetObject(1).GetObject("Address").TextColor  = Color.White;
            employee.GetObject(1).GetObject("Address").Font.Bold  = true;
            employee.GetObject(1).GetObject("Address").Font.Size += 2;

            // see also gridGroupingControl1_QueryCellStyleInfo handler,
            //	case GridTableCellType.AlternateRecordFieldCell:
            //	case GridTableCellType.AddNewRecordFieldCell:
            //	case GridTableCellType.RecordFieldCell:
        }
コード例 #4
0
 //used to clear all the files
 private void buttonAdv3_Click(object sender, EventArgs e)
 {
     TableRecordFieldStyles.Clear();
     this.currentDataSet.Clear();
     this.gridGroupingControl1.Refresh();
 }
コード例 #5
0
 public void Remove(TableRecordFieldStyles tabValue)
 {
     List.Remove(tabValue);
 }
コード例 #6
0
 public void Insert(int intIndex, TableRecordFieldStyles tabValue)
 {
     List.Insert(intIndex, tabValue);
 }
コード例 #7
0
 public int IndexOf(TableRecordFieldStyles tabValue)
 {
     return(List.IndexOf(tabValue));
 }
コード例 #8
0
 public bool Contains(TableRecordFieldStyles tabValue)
 {
     return(List.Contains(tabValue));
 }
コード例 #9
0
 public int Add(TableRecordFieldStyles tabValue)
 {
     return(List.Add(tabValue));
 }