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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How can i calculate age using AX EP Form

(0) ShareShare
ReportReport
Posted on by

i tried to find date difference between two AxBoundField but not successes if anybody know please answer me or suggest link , i attached sample form here. thank you.

0131.forum.png 

asp code here

<dynamics:AxMultiSection ID="AxMultiSection1" runat="server">
<dynamics:AxSection ID="AxSection1" runat="server">
<dynamics:AxMultiColumn ID="AxMultiColumn1" runat="server">
<dynamics:AxColumn ID="AxColumn1" runat="server">
<dynamics:AxGroup ID="AxGroup1" runat="server" FormID="AxForm1">
</dynamics:AxGroup>
<dynamics:AxGridView ID="AxGridView1" runat="server" AllowDelete="True" AllowEdit="True" AllowGroupCollapse="False" AllowInsert="True" AllowMarking="True" BodyHeight="" Caption="Date Counter" CaptionAlign="Top" DataKeyNames="RecId" DataMember="DataSource1" DataSourceID="AxDataSource1">
<Columns>
<dynamics:AxBoundField DataField="FromDate" DataSet="NumberofdaysDS" DataSetView="DataSource1" SortExpression="FromDate">
</dynamics:AxBoundField>
<dynamics:AxBoundField DataField="ToDate" DataSet="NumberofdaysDS" DataSetView="DataSource1" SortExpression="ToDate">
</dynamics:AxBoundField>
<dynamics:AxBoundField DataField="Noofdays" DataSet="NumberofdaysDS" DataSetView="DataSource1" SortExpression="Noofdays">
</dynamics:AxBoundField>
</Columns>
</dynamics:AxGridView>
</dynamics:AxColumn>
</dynamics:AxMultiColumn>
</dynamics:AxSection>
</dynamics:AxMultiSection>

*This post is locked for comments

I have the same question (0)
  • Anand.kushwaha Profile Picture
    55 on at

    Hi Rajaram,

    You can create a method and call it in EventHandler on edit of fields in CS file of web control, which returns No. of days using values from AxBoundField, and use it to display.

    /Anku

  • Anand.kushwaha Profile Picture
    55 on at

    As reference you can check webControl - TSTimesheetEntryPage_ascx_xs. Somethig similar need to be done in your case.

    void GridTimesheetLine_RowUpdated(object sender, GridViewUpdatedEventArgs e)

       {

           e.KeepInEditMode = false;

           this.refreshTotalHours();

           if (e.Exception != null)

           {

               // This is used to indicate that validation has failed when called from saveEditRow()

               validateSuccess = false;

           }

       }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
Basit Profile Picture

Basit 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans