Hello ,
I want to display green background color to the status field with font color as white in the sales order screen. I Followed Two methods for that,
1)Method 1: By using below code in this i obtained colour for status value not in the background, i need background colour for the status field and letters are in white colour.
<px:PXDataSource>
<ClientEvents CommandPerformed="changeStatusColor" />
</px:PXDataSource>
<script type="text/javascript">
function changeStatusColor(sender, e) {
var edStatus = px_all["ctl00_phF_form_t0_edStatus"];
var edStatusControl = document.getElementById("ctl00_phF_form_t0_edStatus");
if (edStatus && edStatus.value == "H")
edStatusControl.background.color = "#FF0000";
else
edStatusControl.style.color = "#00FF00";
}
</script>

Method 2: Using this method, I received no updates to the field. in this case, I make CSS under the Visual Studio App_Themes folder, as shown below.
ASPX:
<px:PXDropDown ID="edStatus" runat="server" DataField="Status" Enabled="False" CssClass="CustomAMIClassGreen" ></px:PXDropDown>
.CSS
.CustomAMIClassGreen
{
background-color: green;
font-weight: bold;
}

Can anyone suggest the solution for this?