Skip to main content
kavyam0002
October 8, 2024
Solved

Row grid

  • October 8, 2024
  • 8 replies
  • 0 views

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

    Best answer by somasundaram.d

    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
    October 8, 2024

    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
    October 9, 2024

    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
    October 10, 2024

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

    kumara0180
    October 10, 2024

    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
    October 9, 2024

    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.

    October 9, 2024