Minor problem with OnDefineCssClass
Hi Guys,
I have a modal dialogue which has one column set up to display the column in different colours depending on the value of another column in the same row. 'application.css' is also set up appropriately.
When the modal dialogue is first initialised (popped up/displayed), the colours appear as they should, but if I close the modal dialogue and then reopen it, the column is no longer coloured.
Any ideas as to why this might be happening?
This happens on my development PC, i.e., using LOCALHOST, but it also (expectedly) happens on the remote web server as well. I've also tried different browsers and the same thing happens in all browsers.
Code:
Object oDetailGrid is a cWebGrid
Set Server to oRostdtl_DD
Set piOrdering to 1
Set piHeight to 600
Set piColumnSpan to 12
Set pbShowSelected to True
Set pbAllowDeleteRow to False
Set pbAutoRegenerate to True
Set pbClearAfterSave to False
Set pbAllowAppendRow to False
Set pbAllowInsertRow to False
Procedure OnLoad
Forward Send OnLoad
WebSet psCSSClass of oRostdtlORDER_OF_TURN to "OrderOfTurn"
End_Procedure
Object oRostdtlORDER_OF_TURN is a cWebColumn
Entry_Item Rostdtl.ORDER_OF_TURN
Set psCaption to "#"
Set piWidth to 20
Set pbEnabled to False
Procedure OnDefineCssClass String ByRef sCSSClass
Forward Send OnDefineCssClass (&sCSSClass)
If (Rostdtl.STATUS = "R") Move "OnRoster" to sCSSClass
Else If (Rostdtl.STATUS = "O") Move "OffRoster" to sCSSClass
Else If (Rostdtl.STATUS = "L") Move "OnLeave" to sCSSClass
End_Procedure
End_Object
Last edited by Rachael; 6-Jul-2019 at 01:44 AM.
Reason: Added a bit more information.
Regards,
Rachael Warlond
1) When programming, never reinvent the wheel.
2) If it works, leave well enough alone.