web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Color a cell of Table control in AX 7?

(0) ShareShare
ReportReport
Posted on by

Hi, does anyone know how to color a cell of Table control in AX7. In AX2012 we used to return an int,real or edit string control and we used to set the color scheme property to RGB and set a color we wanted to show. 
But in AX 7 there is no color scheme property? So how to do that.!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Volker Breitkopf Profile Picture
    on at

    They removed the possibility to do that to ensure "consistent visuals", as you can read in the list of deprecated APIs: ax.help.dynamics.com/.../deprecated-apis (you can search for "ColorScheme" in the page to find it more quickly).

    So depending on your needs you have to find a different way to fulfil the requirement. You could switch to using images instead, for example.

  • Verified answer
    Community Member Profile Picture
    on at

    Well I found the solution myself.

    we can set the property by code of the int,real or string edit that we were returning in edit control previously.

    Just set the following 2 properties:

    1- Element.colorScheme(FormColorScheme::RGB);

    2- Element.backgroundColor(WinAPI::RGB2int(255,205,65));

  • Patryk Zmijewski Profile Picture
    21 on at

    Hi, I'm having similar problem to yours.

    I'm developing a configuration form, in which user is choosing the color, which will be used on some grids in different forms.

    I've used ColorSelection class' static method selectColor, and that part is working, however, the changes that user make can't be seen on a that particular Integer control, since the default foreground color of a Integer control is white.

    To clarify - background color of the grids related to that settings are working properly, but despite the fact I'm changing the background color of the FormIntegerControl on a settings form, it is not changing. (Edit mode keeps it white, while View mode keeps it grey).

    Is there any solution to that issue? I want to avoid using grid in that case, because it is only one field.

    Thanks in advance.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans