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
2490
WinGrid border
posted

How I can change the border style and color for just one cellule ?

I would like the line border more big and red color when x <> y

X = Column #3

y = Column #4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Private Sub ugrdDetail_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles ugrdDetail.InitializeRow

 

 

if e.Row.Cells(Colonnes.QuantiteDemande).value <> e.row.Cells(Colonnes.QuantiteLivree).value THEN

'This property thosen'T work ???

Appearance.BorderColor = Color.Red

END IF

...

...

 

 

 

 

End If

 

 

End Sub

 

 

Parents
  • 4618
    Suggested Answer
    posted

    Hi GIPFG,

    You can certainly modify the appearance property for the cell to create an effect similar to your screenshot; however, you will not have control over the width or thickness of the border.

    I have constructed and attached a sample for achieving your requirement; wherein I have explicitly and dynamically created a custom border for the desired cell, implementing the UltraGrid’s Paint event handler and the Graphics.DrawRectangle() method. Using this approach, you will have complete control of the color and width for the cell border.

    ‘The following screenshot is the resulting behavior from simply modifying the border color thru the appearance properties for the cell.
     

    ‘You will be able to produce the exact behavior that you are describing by explicitly drawing a rectangle of identical dimensions to the cell as an overlay for that cell, modifying its appearance as desired; the following screenshot details the appearance that I have generated in the attached sample.
     

    Please find the sample attached.

    If you have any questions at all regarding this approach, please let me know.

    Sincerely,
    Chris K
    Developer Support Engineer
    Infragistics, Inc.
    www.infragistics.com/support

    CellBorderStyleHighlight93727VB.zip
Reply Children
No Data