Skip to main content
kavyam0002
Brainy
Oct 8, 2024 7:33 AM UTC
Solved

Row grid

we have this grid but the user wants like below how can we transpose this grid to row wise grid

    somasundaram.d
    Employee
    Oct 9, 2024 5:07 AM UTC

    Try creating the transposed data set by using the looping function and a!map() and then pass it to read only grid.

    col1:"Id1"
    col2:"Text1"
    -------------
    col1:"Id2"
    col2:"Text2"
    -------------
    col1:"Id3"
    col2:"Text3"

    This should be converted to 

    {
    a!map(
    col1:"Id1",
    col2:"Id2",
    col3:"Id3"
    ),
    a!map(
    col1:"Text1",
    col2:"Text2",
    col3:"Text3"
    )
    }

    8 replies

    kumara0180
    Participating Frequently
    Oct 8, 2024 8:30 PM UTC

    You can't use any of the grid layout to achieve this. You would need to implement your own logic.  Do you have child data stored some where ?

    somasundaram.d
    Employee
    Oct 9, 2024 5:07 AM UTC

    Try creating the transposed data set by using the looping function and a!map() and then pass it to read only grid.

    col1:"Id1"
    col2:"Text1"
    -------------
    col1:"Id2"
    col2:"Text2"
    -------------
    col1:"Id3"
    col2:"Text3"

    This should be converted to 

    {
    a!map(
    col1:"Id1",
    col2:"Id2",
    col3:"Id3"
    ),
    a!map(
    col1:"Text1",
    col2:"Text2",
    col3:"Text3"
    )
    }

    kavyam0002
    Brainy
    Oct 10, 2024 5:34 AM UTC

    this worked but how to handle if the number of columns get increased since their is no limit on child column

    kumara0180
    Participating Frequently
    Oct 10, 2024 5:39 AM UTC

    You would need to restrict the number of columns visible at a time to say 3/4 and then users would need to click on next or previous button to fetch more data and to show next set of data. 

    konduruc733182
    Inspiring
    Oct 9, 2024 5:45 AM UTC

    Hello [mention:bd2e537916fe4b31980bfba549754efc:e9ed411860ed4f2ba0265705b8793d05] 

    Can be done, but would not be a good user experience if the number of child exceeds a certain limit of rows in your data. Does this have a limit of child? Please share the limit, will provide a doable solution.

    Participating Frequently
    Oct 9, 2024 6:07 AM UTC