WinGrid border

Answered (Not Verified) This post has 0 verified answers | 2 Replies | 2 Followers Thread's RSS feed.

GIPFG
Points 935
Replied On: Tue, Jun 12 2012 12:39 PM Reply

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

 

 

  • Post Points: 20

All Replies

Answered (Not Verified) Replied On: Wed, Jun 13 2012 12:56 PM Reply

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

  • Post Points: 20
GIPFG
Points 935
Replied On: Wed, Jun 13 2012 1:24 PM Reply

Thank you.

Is what I want.

Is work fine.

Francois.

  • Post Points: 5
Page 1 of 1 (3 items) | RSS