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

Community site session details

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

Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

(0) ShareShare
ReportReport
Posted on by 46

Hi all,

I am trying to minimize/optimize the space as much as possible on a list page grid. (unfortunately the user's custom size is not an option)

reading from this blog looks like my best option is doing the Grid.AutoSizeColumns(false);

Also reading further I found out that listPage does not allow to override methods. They have to be made from their assigned InteractionClass.

Since my custom listPage is a copy from the ProdTableListPageInteraction I am trying to get the  grid control object but I am having difficult with that.

 to get the Idea I want to get something that looks like this, since there is more that 40 columns every space saved makes a big difference for the user:

pastedimage1624372501072v1.pngpastedimage1624372768786v3.pngpastedimage1624373304688v4.png

Actually I dont know if that is the way to go. But setting each column to a Fixed width (chars length) will do the job at least.

I dont know if alse the default AX padding for columns can be disabled as well.

Thanks a lot for your help in this.!

I have the same question (0)
  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at
    RE: Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

    You can manage it with Fixed with, but the run time settings will be broken for many reasons such as user personalization. A separate issue is that data's length will change.

    Have you considered not showing some of the fields instead?

    Put two check boxes somewhere and show the first 20/40 fields (don't show them)

    Or you can get a value from user (5..13) and show that fields

  • CBNestor Profile Picture
    46 on at
    RE: Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

    I want to try with the Fixed width first.

    1. When setting up the Width in pixel I can see that the column can grow. but If I put a minimal width like 50 pixels

       nothing changes in the column.

    2. Is it possible to set the width by characters? I am putting some values in the DisplayLength but nothing changes.

       2.1. If I resize a column on UI. I know I can get the number of characters or the column. but, Can I get also the width in

              pixel?

    the Idea is actually showing as much as possible.

    thanks for you time

  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at
    RE: Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

    The problems you're having are probably related to user customazition.

    Set the Design/AllowuserSetup property to No.

    The Width property override displayLength. Try after set Width to "Auto"

  • CBNestor Profile Picture
    46 on at
    RE: Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

    Its looking better now thanks a lot!.

    I reduced the Font size of whole grid to 8.

    And I had to play with all properties combination possible ( also needed to create a job for that, it is crazy doing it by hand)

    Just need few things to get it finished and this will help show all columns available:

    1. Hide the FactBoxes Pane by default (right side pane). The parts' Visible property set to 'no' it is still showing them :/.

    2. Hide Navigation Pane by default (left side pane) or

      2.1  Opening the listPage form in a Full Size Separated window. (this I don't see the property for that)

    pastedimage1624517822033v1.png

  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at
    RE: Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

    These panes come from design. I haven't tried it but I can think of two methods to not show the left pane.

    First, don't Open form directly. Make a class, call the form menuItem from the class.

    Second, set the design to auto but set the design again with "this.design().style()" in the code.

    You have to call it after super in the run method (the design should be auto when first opened). If you call super a second time afterwards, you can trick the ax.

    I have to look at the right panel. I'll let you know if I have time during the day.

  • ergun sahin Profile Picture
    8,826 Moderator on at
    RE: Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

    "The parts' Visible property set to 'no' it is still showing them :/". 

    Normally what you do should be enough. Does it show an empty pane?

  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at
    RE: Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

    Delete them if you don't want to show them. (We can search the cause but let's don't waste our time)

  • CBNestor Profile Picture
    46 on at
    RE: Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

    Shows Every fact box pane like the property is override by something else. The only one hidden is the Preview pane (bottom pane)

  • ergun sahin Profile Picture
    8,826 Moderator on at
    RE: Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

    Like I said, don't bother, delete if you're not going to use it. If you don't want to delete, you can try setting displayTarget to EP (I'm assuming you are not using the form in EP)

  • Suggested answer
    CBNestor Profile Picture
    46 on at
    RE: Optimize Column width in Form's LisPage grid (InteractionClass) AX2012R3

    Hi Ergün,

    Thanks very much for the support.

    So finally what I did was:

    1. Reducing the font size to minimal = 8 (huge impact)

    2. all qty goods fields (12 in total) set NoOfDecimals  = 0. with this I reduce 3 characters per each qtyColumn ( 32 characters reduced in total).

    2. Fixed values with the DisplayLegth. It did no make much difference setting the width to Auto. for the realEdit fields it worked better with 'Column width' and putting short column label ( around 3 or 4 chars max).

    3.Eventually, also possible Round the QtyHours fields to only One decimal and that would reduce 20 more chars to the whole grid.

    since this is listPage is using interactionClass I avoid the use of code on methods. So I will take your recomendations for another project :). I havent worked with interaction classes before, it looks like handling the elements properties is not that straight forward.

    on my screen almost 90% shown with panes :)

    pastedimage1624553483482v1.png

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans