Page 1 of 1

Changing colour of line depending on product

PostPosted: Fri Sep 18, 2020 12:17 pm
by aegean66
HI guys

Not overly hopeful on a response but;

How to I get to the properties of a line on a quotes text colour depending on part number.

Eg:
If PartNo = "ABC123" then
Make the text colour of this line blue (or background colour)

Cheers.

Re: Changing colour of line depending on product

PostPosted: Mon Sep 21, 2020 11:26 am
by Scott.Pearce
Put this in the "Form GridLines Displayed" breakout section:

Code: Select all
If FormObject.GridManager.GridText(FormObject.grdLines, "PartNo", Row) = "1171" Then
    FormObject.grdLines.Col = -1
    FormObject.grdLines.Col2 = -1
    FormObject.grdLines.Row = Row
    FormObject.grdLines.Row2 = Row
    FormObject.grdLines.ForeColor = vbBlue
End If


Note. The SalesOrderLineObject that is passed in to that breakout point is Nothing for me, which is why I'm using the grid object to get the part no. Must be an old bug.