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 :
Business Central forum

Modify Width of Field Group Fields

(0) ShareShare
ReportReport
Posted on by 336

How do you modify the width of fields in the dropdown brick?

Categories:
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    You cannot programmatically control the width of a colum. This is applyed automatically accordingly to the field length.

  • Hannes Holst Profile Picture
    5,767 on at

    Not sure if it will work with dropdowns but give it a try with below:

    pageextension 50000 "My Extension of Item List" extends "Item List"
    {
        layout
        {
    
            modify("No.")
            {
                Width = 20; // the value represents number of characters
            }
        }
    
    }



  • dkkipfer Profile Picture
    336 on at

    Thanks for the suggestion. I tried that first without success. It seems like the only extending you can do with bricks are adding fields via a table extension and the addafter property.

    For dropdowns where we're selecting a part number, it would make sense to be able to see the whole part number without having to hover over the item with the cursor. I might suggest this as an idea if it hasn't already been submitted.

  • dkkipfer Profile Picture
    336 on at

    It doesn't seem like the automatic control works very well. Or we should at least have the option to extend it if we need to override the default width. Many of our item numbers get cut off in the dropdown and users have to hover over the part to make sure they're selecting the right one.

  • Verified answer
    Hannes Holst Profile Picture
    5,767 on at

    Hi Drew,

    You have to apply the correct page that is used as your lookup.
    For the Item Lookup, use the following:

    pageextension 50000 MyExtension extends "Item Lookup"
    {
        layout
        {
            modify("No.") // column you want to modify
            {
                Width = 50; // enough space for 50 characters
            }
        }
    
    }


    Works a treat for me:

    8322.Untitled.png

    And yes, auto-sizing of the column width does have an effect only when you resize the browser. So, it doesn't work in all situations, especially lookups.

  • dkkipfer Profile Picture
    336 on at

    Item Lookup --- seems so obvious now. Thanks for pointing me in the right direction!

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans