Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Form Real Control in Grid

(0) ShareShare
ReportReport
Posted on by 55

Hello, 


I have requirement from a client. 

1- I have grid and the grid contains fields connected to a data source. One field is Amount and that Amount is a real data type.

2- ENUM field have four element(A, B, C, D)

3- they ask  if the base Enum is A I need to show the Amount without the decimal points other wise I need to show the decimal point.

Example: 

Enum Field       Amount Field
A                       50
B                       55.15
C                      30.30

my question How I can achieve that?

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: Form Real Control in Grid

    Hi yousefsuli ,

    This can be achieved using "MinNoOfDecimals" property on the control.

    On the modified method of Enum field add the if condition like

    If(this.EnumField == EnumField::A)
    {
        controlName.MinNoOfDecimals(0);
    }
    else
    {
        controlName.MinNoOfDecimals(-1);
    }

    Thanks,

    Girish S.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,933 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,801 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans