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 :
Customer experience | Sales, Customer Insights,...
Answered

Dynamics Portals - Show multiline text formatted in subgrid

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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.

  • PetrK Profile Picture
    5 on at

    Can you send me detail how can I do that?

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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.

  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    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

  • PetrK Profile Picture
    5 on at

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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans