Home Forums WinForms controls Xceed Grid for WinForms changing row color

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

    I want to change the font color or fore color upon double click. how can i do that after the double click hander?

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

    User (Old forums)
    Member
    Post count: 23064

    Pingo!! I managed to get the resust as follows:

    Dim row As CellRow = grdMenus.CurrentRow
    If row.ForeColor.Name = “Red” Then
    row.ResetForeColor()
    Else
    row.ForeColor = Color.Red
    End If

    Please post your comments, if anyone finds better option than this.

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

    User (Old forums)
    Member
    Post count: 23064

    Nice solution, but just 1 remark: I don’t think you need to compare the name of the color with “Red”. I think it’s faster to just do this:<code>If row.ForeColor = Color.Red Then</code>

    Imported from legacy forums. Posted by Tommy (had 3281 views)

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