Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Dynamics Portals - Show multiline text formatted in subgrid

Posted on by 5

Hi,

We have Dynamics Portals for Clients where we are working on their support cases. Every case has N solution steps with multiline text field, so solution step entity is shown as subgrid on case entity form. Unfortunately subgrid on Portals is not able to show separate lines/formatted text, so the structured text is just in one line and confusing.

Is there a way how to show formatted text in portals subgrid?

Snipaste_5F00_2020_2D00_07_2D00_10_5F00_13_2D00_54_2D00_22.png

  • PetrK Profile Picture
    PetrK 5 on at
    RE: Dynamics Portals - Show multiline text formatted in subgrid

    That was it, only difference was that css was called .entity-grid

  • Verified answer
    cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Dynamics Portals - Show multiline text formatted in subgrid

    Hi PetrK,

    You can use the CSS: white-space:pre to achieve it.

    The PRE element tells visual user agents that the enclosed text is "preformatted". When handling preformatted text, visual user agents:

    May leave white space intact.

    May render text with a fixed-pitch font.

    May disable automatic word wrap.

    Must not disable bidirectional processing.

    Here are steps.

    1.Open the page of this portal and press F12 to look code.

    3531.png

    2.Clcik Elements and look for “class=entitylist".

    6254.png

    3. Create a new CSS file, the content is following.

    .view-grid {

        overflow-x: auto;

        white-space:pre;

    }

    4.Add this file to portal.

    (1) login into the Portal with credentials having Administrator security role.

    (2) add a new Child file to Home page using “Administrator” panel on the upper right side of the screen.

    0334.png

    (3) click choose file to select CSS file that you create just now.

    2235.png

    (4) click Save button.

    5.Test.

    In some cases, changes are not reflected immediately on the portal. For this, kindly restart the portal and check.

    Before:

    4762.png

    After:

    84150.png

    Regards,

    Clofly

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Dynamics Portals - Show multiline text formatted in subgrid

    Hi Petr,

    In your Dynamics Portal, you need to add a Web file of type stylesheet.

    This stylesheet will contain the styles that will make up your table. Note that based on how you configure your stylesheet it might change all your portal tables or just this one.

    You can go ahead to your Portal page that displays the page and take a look at the code (pressing F12) that makes up that stylesheet.

    In your code, look for div class=entitylist, and under that you will have the code that displays the grid. There is a section under that shows div class="view-grid", and in there you will see the table, thead, tbody, tr and td elements.

    Look for the elements that you need to modify and apply the changes. Once you get it working to your satisfaction copy the code to the new web file that you created, and upload it. You should be able to see your changes after that.

    Hope this helps.

  • PetrK Profile Picture
    PetrK 5 on at
    RE: Dynamics Portals - Show multiline text formatted in subgrid

    Can you send me detail how can I do that?

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Dynamics Portals - Show multiline text formatted in subgrid

    Hi PetrK,

    You should be able to do this using CSS.

    We did it in our implementation of Portals, but our logic was slightly different as we customized the CSS to show tables similar to they way they are on Mobile device.

    Hope this helps.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans