Home Forums WinForms controls Xceed Grid for WinForms different cell forecolors in the selected row

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17351 |

    I found a solution (in this Forum) to allow the cell’s background color to show through the SelectionBackColor, but is there a way to allow the cell’s foreground color to show the SelectionForeColor?

    Imported from legacy forums. Posted by Morgan (had 1370 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    you could refer to http://xceed.com/CS/forums/permalink/25629/25664/ShowThread.aspx#25664 …  Other than these indications, I don’t have other hints to give you.  Unless you can give us the ****exact behaviour**** that you can’t obtain yet.

    Regards

    Imported from legacy forums. Posted by Ghislain (had 308 views)

    User (Old forums)
    Member
    Post count: 23064

    When a row is made current, all the cells in that row take on the forecolor of the selection bar.  I want to keep the cell’s original forecolor and not have it replaced by the forecolor of the selection bar.

     

    Ghislain,

    For some reason my inquery “different cell forecolors in the selected
    row” is locked.  The answer you gave is not the answer to the question I
    asked.

    You answer deals with changing the forecolor of a cell
    being edited.

    My question was dealing with a row being selected.  I do not want to allow editing.

    “When
    a row is made current, all the cells in that row take on the
    forecolor of the selection bar.  I want to keep the cell’s original
    forecolor and not have it replaced by the forecolor of the selection
    bar.”

     

    Imported from legacy forums. Posted by Morgan (had 294 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    this should do:

            public Form1()
            {
                Xceed.Grid.Licenser.LicenseKey = “GRD38-…..-…..-RNAA”;
                InitializeComponent();
                gridControl1.SelectionMode = SelectionMode.None;
                foreach (Column column in gridControl1.Columns)
                {
                    column.CellEditorManager.SettingControlAppearance += new Xceed.Grid.Editors.CellEditorEventHandler(CellEditorManager_SettingControlAppearance);
                }
            }

            void CellEditorManager_SettingControlAppearance(object sender, Xceed.Grid.Editors.CellEditorEventArgs e)
            {
                e.Control.ForeColor = Color.Blue;
            }

            private void Form1_Load(object sender, EventArgs e)
            {
                // gridControl1.SingleClickEdit = true;   // to make the grid cells editable on a single click
            }

    Imported from legacy forums. Posted by Ghislain (had 2085 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.