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)

Adding Grid programmatically

(0) ShareShare
ReportReport
Posted on by

i want to add Grid to form programmatically onclick event using x++

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,994 Most Valuable Professional on at

    What's the business requirement that you decided to implement by this technical design? It's likely that we'll able to suggest a better approach.

  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    Hi Abid Omer,

    It does not  sound like a good idea for me as well,  however, if you really want to do it you can read this blog article

    blogs.msdn.microsoft.com/.../using-x-to-add-a-control-at-runtime

    it shows how to add button in run time so you can use it as example.

    And here you can find how to build form in run time with a grid http://axhelper.blogspot.co.nz/2011/01/create-form-with-x-code-run-time-form.html

  • Community Member Profile Picture
    on at

    thanks ievgen i'll check it

  • Community Member Profile Picture
    on at

    hi martin .. i need to create someting like a report .. any employee have some calculated data ...i need to do this on runtime  .. i created table with field and fill it .. after that i want to set table as datasource to grid control ..

  • Faisal Fareed Profile Picture
    10,796 User Group Leader on at

    Hi Abid,

    To achieve this requirement you dont need to create grid at runtime.

    There are out-of-box form templates in AX you can use these to create forms very quickly, follow these steps.

    msdn.microsoft.com/.../hh538488.aspx

    Well described post on your requirement is here community.dynamics.com/.../form-development-from-scratch-dynamics-ax-2012-r3-part-1

    For calculated fields you need to write display methods; this is how you can create display methods jkmsdax2012.wordpress.com/.../create-simple-display-method-in-ax-2012

  • Community Member Profile Picture
    on at

    thanks faisal .. i'll try it .. and let u know

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
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans