private void grid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
 {
     if (e.ColIndex == this._colIndex && e.RowIndex == this._rowIndex)
     {
         e.Style.CellAppearance = GridCellAppearance.Sunken;
     }
 }
Пример #2
0
 private void grid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
 {
     // Highlight columns
     if (Math.Abs(e.ColIndex - this.highlightColumn) < 2 && e.ColIndex != e.RowIndex)
     {
         e.Style.BackColor = Color.Red;
     }
 }
 public override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
 {
     e.Style.ShowButtons       = GridShowButtons.Show;
     e.Style.Clickable         = true;
     e.Style.TextAlign         = GridTextAlign.Left;
     e.Style.VerticalAlignment = GridVerticalAlignment.Middle;
     e.Style.WrapText          = false;
 }
Пример #4
0
        private void grid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
        {
            if (e.ColIndex == 0 && e.RowIndex > 0)
            {
                e.Style.Text = e.RowIndex.ToString();

                e.Style.Font.Bold = false;
            }
        }
Пример #5
0
 /// <override/>
 public override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
 {
     // Here you can adjust settings that override the default settings from the grid
     e.Style.ShowButtons       = GridShowButtons.Show;
     e.Style.Clickable         = true;
     e.Style.TextAlign         = GridTextAlign.Left;
     e.Style.VerticalAlignment = GridVerticalAlignment.Middle;
     e.Style.WrapText          = false;
 }
Пример #6
0
        /// <override/>
        public override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
        {
            e.Style.HorizontalAlignment = GridHorizontalAlignment.Center;
            e.Style.VerticalAlignment   = GridVerticalAlignment.Middle;
            object val = this.Grid.Model[e.Style.CellIdentity.RowIndex, 1].CellValue;

            e.Style.ShowButtons = GridShowButtons.Show;
            e.Style.Clickable   = true;
        }
Пример #7
0
 void GridGroupDropArea_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
 {
     e.Style.Font.Facename = "Segoe UI";
     e.Style.Font.Size     = 8.25f;
     if (e.Style.Text.StartsWith("Drag a"))
     {
         e.Style.TextColor = Color.FromArgb(22, 74, 167);
     }
     else
     {
         e.Style.TextColor = Color.FromArgb(141, 141, 141);
     }
     e.Style.BackColor   = Color.FromArgb(227, 239, 255);
     e.Style.Borders.All = new GridBorder(GridBorderStyle.None);
 }
Пример #8
0
        /// <summary>
        /// Prepare Style for For Frozen Columns and Rows
        /// </summary>
        private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
        {
            if (e.RowIndex > 0 && e.ColIndex > 0)
            {
                Color c = Color.FromArgb(192, 201, 219);

                if (e.RowIndex == this.gridControl1.Rows.FrozenCount)
                {
                    e.Style.Borders.Bottom = new GridBorder(GridBorderStyle.Solid, c, GridBorderWeight.Medium);
                }

                if (e.ColIndex == this.gridControl1.Cols.FrozenCount)
                {
                    e.Style.Borders.Right = new GridBorder(GridBorderStyle.Solid, c, GridBorderWeight.Medium);
                }
            }
        }
Пример #9
0
        /// <summary>
        /// Set the Header Text for GridListControl
        /// </summary>
        void Grid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
        {
            if (e.RowIndex == 0)
            {
                switch (e.ColIndex)
                {
                case 1:
                {
                    e.Style.Text = "Short Name";
                    break;
                }

                case 2:
                {
                    e.Style.Text = "Long Name";
                    break;
                }

                default:
                    break;
                }
            }
        }
Пример #10
0
 public override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
 {
     e.Style.Enabled = true;
     e.Cancel        = true;
 }
Пример #11
0
 void gridDisplay_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
 {
     e.Style.Borders.All = GridBorder.Empty;
 }
Пример #12
0
 private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
 {
 }
Пример #13
0
 private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
 {
     if (SelectedTargetRows.Contains<int>(e.RowIndex))
     {
         e.Style.BackColor = SystemColors.InactiveCaptionText;
         e.Style.TextColor = SystemColors.WindowText;
     }
     else
     {
         e.Style.BackColor = SystemColors.Window;
         e.Style.TextColor = SystemColors.WindowText;
     }
 }