Help with Fetchcellstyle event

Posted by: Victor.m.charles.civ on 1 October 2020, 12:55 pm EST

    • Post Options:
    • Link

    Posted 1 October 2020, 12:55 pm EST

    Hi,

    How do I modify code below to apply to a specific column, instead of all columns in the Grid control?

    e.CellStyle.Font = New Font(Me.C1AOP8.Font, FontStyle.Underline)

    e.CellStyle.ForeColor = Color.Purple

    Thanks,

    Victor

  • Posted 5 October 2020, 1:56 am EST

    Hi Victor,

    You can set the FetchStyle property of the specific DisplayColumn to True for which you want to use the FetchCellStyle event of TDB.

    If you have set the FetchStyle property of all the columns to True then you can use the condition to set the property for a specific column:

    Private Sub C1TrueDBGrid1_FetchCellStyle(sender As Object, e As C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs) Handles C1TrueDBGrid1.FetchCellStyle
      If e.Col = 1 Then
         e.CellStyle.ForeColor = Color.Purple
      End If
    End Sub
    

    Regards,

    Prabhat Sharma.

  • Posted 7 October 2020, 12:41 pm EST

    Thank you.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels