Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
703
Problem while binding forecolor of a cell dynamically
posted
I have a grid where a particular cell of my each row will have different forecolors. I am saving colors as string like "red", green, blue and is stored in the binding list binded with the grid. While using the code e.Layout.Bands(0).Columns(1).CellAppearance.BackColor = Color.LightYellow i am facing two issues: 1. i am not able to get my desired cell 2. entire column is set with one color as they are of type color enums
Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    To color a cell, you need to use the Appearance on the cell. The CellAppearance on the column applies to all cells in the column.

    Typically, you would do this in the InitializeRow event. You might want to take a look at the WinGrid Performance Guide.

    There is some discussion there about how to do this in the most efficient way along with some sample code.

Children
No Data