how to give bg color for form grid records in x++

 ->The displayOption method can be overridden on a form data source.


-> Right-click the Methods node under the data source, point to Override Method, and then click displayOption.


 public void displayOption(Common _record, FormRowDisplayOption _options)

        {

            Employee profile; // table

            profile = _record;


            if(profile.EmpSalary<=15000)

            {

                _options.backColor(WinAPI::RGB2int(255,255,0)); // yellow

            }

            super(_record, _options);

        }

Comments

Popular posts from this blog

How to Create a wizard in x++ d365

how to post trade agreement journals automatically using x++ code

X++ code to CREATE AND POST A TRADE AGREEMENT IN MICROSOFT DYNAMICS 365 in D365 F & O