Hello Guys...!
Problem
How to change grid row color in listpage/ form in Dynamics Ax 2012 ?
Solution :
Go to Form Datasource and override Displayoption() method and write code according to your requirement.
Example :
public void displayOption(Common _record, FormRowDisplayOption _options)
{
SalesTable prodtablelocal;
prodtablelocal = _record;
Switch(prodtablelocal.SalesStatus)
{
Case SalesStatus::Delivered:
_options.backColor(65535); //Light Yellow
//_options.affectedElementsByControl(Salestable_SalesId.id());
Break;
Case SalesStatus::Invoiced:
_options.backColor(8421631); //Light Red
//_options.affectedElementsByControl(Salestable_SalesId.id());
Break;
Case SalesStatus::Backorder:
_options.backColor(65408); //Light Green
//_options.affectedElementsByControl(Salestable_SalesId.id());
_options.textColor(12582912);
Break;
}
}
@Rahul Talasila
Problem
How to change grid row color in listpage/ form in Dynamics Ax 2012 ?
Solution :
Go to Form Datasource and override Displayoption() method and write code according to your requirement.
Example :
public void displayOption(Common _record, FormRowDisplayOption _options)
{
SalesTable prodtablelocal;
prodtablelocal = _record;
Switch(prodtablelocal.SalesStatus)
{
Case SalesStatus::Delivered:
_options.backColor(65535); //Light Yellow
//_options.affectedElementsByControl(Salestable_SalesId.id());
Break;
Case SalesStatus::Invoiced:
_options.backColor(8421631); //Light Red
//_options.affectedElementsByControl(Salestable_SalesId.id());
Break;
Case SalesStatus::Backorder:
_options.backColor(65408); //Light Green
//_options.affectedElementsByControl(Salestable_SalesId.id());
_options.textColor(12582912);
Break;
}
}
@Rahul Talasila
Very useful breakdown on using the displayOption() method in AX 2012! Changing grid row colors based on status makes the UI much more intuitive for end users. Also, for those working on enterprise-level solutions, choosing an affordable dedicated server hosting option can ensure smooth performance and reliability for large-scale Dynamics deployments.
ReplyDelete