Skip to main content
hema.mathivathanan
Employee
Apr 20, 2023 10:27 AM UTC
Question

read-only grid display

Hi, 

I used read-only grid to display data.  I want the label position as justified. When I view the interface from the front end, I could see some of the fields in the read-only grid is continuing in the next line like below. 

Here, I want the field "sample application result" to display in one line and not in 2 lines. 

example: 

sample application      pass

result

I want it to get displayed as : 

sample application result   pass

Can someone help me out here?

    22 replies

    Participating Frequently
    Apr 20, 2023 10:39 AM UTC

    Hi, can you share some screenshots for better understanding if you are talking about the column width we can change it.

    stefanhelzle0001
    Brainy
    Apr 20, 2023 10:39 AM UTC

    Sure. Use a richTextDisplayField as the value and set preventWrapping to true.

    hema.mathivathanan
    Employee
    Apr 20, 2023 10:52 AM UTC

    I used a richtextdisplayfield , I am fetching the value from the record. How to give the value while using the richtextdisplayfield. 

    a!textField(
    label: "sample application result",
    labelPosition: "JUSTIFIED",
    value: a!richTextDisplayField(
    value: a!richTextItem(
    text: 
    ),

    preventWrapping: true
    ),

    gopalk2865
    Participating Frequently
    Apr 20, 2023 10:56 AM UTC

    use fv!row[recortType!yourRecordtype.field]

    harshitb6843
    Brainy
    Apr 20, 2023 10:40 AM UTC

    If you are talking about grid headers, then thats not possible. If you're talking about the cells, then you can follow Stefan's approach!

    hema.mathivathanan
    Employee
    Apr 20, 2023 11:01 AM UTC

    a!richTextDisplayField(
    label: "sample application result",
    labelPosition: "JUSTIFIED",
    value: {
    a!richTextItem(
    text: ri!record[]
    ),

    },
    preventWrapping: true
    ),

    Is this the correct way to mention ? Even this is not wrapping the text to a single line, not sure why

    harshitb6843
    Brainy
    Apr 20, 2023 11:03 AM UTC

    Can you maybe add a screenshot and the entire code of the grid you are using? 

    anshurajsinghr3189
    Participating Frequently
    Apr 20, 2023 1:03 PM UTC

    To adjust the column width of a grid to fit the content automatically, you can set the width of the column to "auto".

    hema.mathivathanan
    Employee
    Apr 21, 2023 12:02 PM UTC

    Thanks everyone for your support, This issue is resolved after creating a common interface which has the rule input for field name and value and defined  the width as per my requirement.