Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
As part of my experience I have a long parts list that users can interact with to put together a shopping list. Is it possible to manipulate gridlayout and widgets using js to dynamically add a row and several widgets to the new row as needed? I ran across someone talking about how they found the code to create widgets in runtime but I haven't been able to find his (or her) example again to implement it into the experience. I could set it all up manually but there's 200+ entries that I'd need to do it for each part of my experience so if there's a way to streamline the process that'd be amazingly helpful.
Solved! Go to Solution.
Hi @cmodin,
I do not believe that it is currently possible to change dynamically the grid layout. If we suppose that still, we can try to use some of the UI interfaces methods to add some row and columns but this will extremely difficult to be handled – so many part with a dynamic grid.
I think we can use instead use a DataGrid as mention in the post "Data Format of Data Grid". So for example you list could be a service which returns an infoTable and you can display it .
In case that your require a row coating not only a labels but also other widget you can try to use an repeater
In the picutre below, I have a repater which contains rows with different widgets (image, labels and checkbox)
In this example it is on popup widget, but it could be also used in a panel. When the list is longer as displayed - a vertical scroll bar automatically appears as part of the repeater functionality.
May be here the usage of a repeater widget could be an option for you.
Hi @cmodin,
I do not believe that it is currently possible to change dynamically the grid layout. If we suppose that still, we can try to use some of the UI interfaces methods to add some row and columns but this will extremely difficult to be handled – so many part with a dynamic grid.
I think we can use instead use a DataGrid as mention in the post "Data Format of Data Grid". So for example you list could be a service which returns an infoTable and you can display it .
In case that your require a row coating not only a labels but also other widget you can try to use an repeater
In the picutre below, I have a repater which contains rows with different widgets (image, labels and checkbox)
In this example it is on popup widget, but it could be also used in a panel. When the list is longer as displayed - a vertical scroll bar automatically appears as part of the repeater functionality.
May be here the usage of a repeater widget could be an option for you.