DECLARE VARIABLE nUseColor AS QUANTITY

PROCEDURE OnRowData 
	DECLARE PARAMETER nRowNo as QUANTITY 
	DECLARE PARAMETER nSel as QUANTITY 
	DECLARE PARAMETER nRowStyle as QUANTITY DO
{
	IF ( [nUseColor] = 1) DO
	{
		IF ( (GetFieldValue("Order Status") = "0") OR (GetFieldValue("Order Status") = "1") ) THEN
		{
			IF (  GetFieldValue("BUY_SELL")  = "1")  THEN
				SetRowColor( [nRowNo],-1,RGB(67,244,244));
			ELSE
				SetRowColor( [nRowNo],-1,RGB(184,70,79));
		}
		ELSE
		{
			SetRowColor( [nRowNo],-1,RGB(100,100,100));	
		}
	}
}

PROCEDURE AddBlotterRowContextMenuItems DO
{
	IF ( GetContextFieldValue("Order Status") = "0")  DO
	{
		AddContextMenuItem("","Cancel Order",23323,"",1);
	}
}

PROCEDURE EnableColor 
	DECLARE PARAMETER sEnable as TEXT DO
{
	IF ( [sEnable] = "TRUE") THEN
	{
		[nUseColor] := 1;
	}
	ELSE
	{
		[nUseColor] := 0;
	}
}





