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)

Convert AX table to System.Data.DataTable in AX2012

(0) ShareShare
ReportReport
Posted on by 30

Hi Experts,

For using System.Windows.Forms.DataGridView in AX2012 form, I need to set the DataSource property for DataGridView, but the only way I got know is set the Column value in each row, it's very inefficient, is there any way to direct convert a AX table instance to System.Data.DataTable instance, so that I can set it to property DataSource of DataGridView.

Thanks

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,035 Super User 2025 Season 2 on at

    Hi DanielBai,

    Why do you need this control? What is the difference with the default grid control provided within the AOT?

  • Rudi Hansen Profile Picture
    4,075 on at

    I am pretty sure there is no standard method to convert an AX table into System.Data.DataTable, especially since it would in some way have to handle how meany records you actually need to show in the DataGridView, and how would it know that?

    So to get this done you would have to write your own converter, and I am not saying that could not be done, but again like André says WHY?

  • DanielBai Profile Picture
    30 on at

    Since there's a requirement that need freeze the first column(or first several columns) of grid, just like in excel, to fulfill this requirement, we need to use DataGridView

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Would the (free) workaround be to export the contents to Excel and freeze it there?

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans