RSS

Fill color in Grid records based on condition flag in AX

30 Aug

My client requirement was to change the grid row’s color in dynamics ax 2012 on the condition basis.

There is a method displayOption() method on a form data source which can be useful to highlight particular rows on grid, based on the data in the record. displayOption() method will execute once for each record before the record is displayed on the form.

public void displayOption(Common _record, FormRowDisplayOption _options)
{
 #define.DeepSkyBlue(0, 191, 255)

 if (_record.(fieldnum(ProdTable,ProdStatus))==ProdStatus::ReportedFinished)
 {
 _options.backColor(WinAPI::RGB2int(#DeepSkyBlue));
 }

 super(_record, _options);
}

Happy Daxing 🙂

Reference :
Highlighting record in Grid

How to change grid row color in listpage form in Dynamics Ax 2012

Advertisements
 

Tags: , , , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: