Home Forums WinForms controls Xceed Grid for WinForms row formating for

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

    how can i format a row in a bound data grid.
    i want to change the backcolor of the row depends upon the cell value.

    Imported from legacy forums. Posted by PETE (had 1974 views)

    Xceed Support
    Member
    Post count: 5658

    You can directly reference the cell value in the code. Here is a little snippet that shows how you could proceed:

    e.g.,
    <code>
    foreach( Xceed.Grid.DataRow row in gridControl1.DataRows )
    {
    if( row.Cells[ “Country” ].Value.ToString() == “Canada” )
    {
    row.BackColor = Color.Red;
    }
    }
    </code>

    Imported from legacy forums. Posted by CharlesB (had 2870 views)

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