Skip to main content
Post a question

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Create Dynamic columns in Grid or Create Pivot table in Grid

Like (0) ShareShare
ReportReport
Posted on 3 May 2023 12:22:43 by 46

Hello Everyone

i have a requirement that make column dynamically based on selected data

let us assume i have a filter multi select for inventlocations and if i select 3 the grid will contain 3 columns if i select 5 the grid will contain 5 columns

how can i reach my requirements i need a code to do that ?

thanks in advance

  • Martin Dráb Profile Picture
    231,723 Most Valuable Professional on 03 May 2023 at 13:31:52
    RE: Create Dynamic columns in Grid or Create Pivot table in Grid

    Moved from Dynamics AX forum.

    A grid is not a very good tool for this task. But if you set an upper limit for the number of columns, like ten, you can create a table with such a number of fields and hide those that you don't need at runtime.

    You'll make your life easier if you follow normal F&O GUI design patterns.

  • OmarAbdlhamed Profile Picture
    46 on 03 May 2023 at 13:16:41
    RE: Create Dynamic columns in Grid or Create Pivot table in Grid

    Hi Martin,

    its for form Grid control in D365fo

  • Martin Dráb Profile Picture
    231,723 Most Valuable Professional on 03 May 2023 at 13:07:21
    RE: Create Dynamic columns in Grid or Create Pivot table in Grid

    What do you want to do it with the data? If it's for reporting purpose, the Matrix control in a report would be the easiest option.

    Which version of AX is it about? You don't have the same options in all versions.

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,850 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans
Loading started