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
No comments:
Post a Comment