taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

Mapping Array to Grid Component(Columns)

Hello,

I want to map an array to grid component with four columns.

(Every column should span the data than a new row should created from the data.)

Thanks,

John de Quarius
Posts: 0
Joined: Fri Dec 11, 2015 7:16 pm

Mapping Array to Grid Component(Columns)

Toucher,

Where is the array data coming from? To map array values to the grid you need to define or add elements to the grid as the grid is simply just a table with empty fields meaning you need to add placeholder or element such as label or input. and if the array is coming from a service the you can simply do mapping.

taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

Mapping Array to Grid Component(Columns)

Hi John,

I can map the data as you wrote. There is no problem with mapping.

What i want :

For example: I have an array of images with urls, I need to display them in my grid with four columns. I want to display first four of them side by side in columns, then the grid should span new row for the next four images.

I hope, i could explain.

John de Quarius
Posts: 0
Joined: Fri Dec 11, 2015 7:16 pm

Mapping Array to Grid Component(Columns)

Could you post screenshots of the response and the grid please

taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

Mapping Array to Grid Component(Columns)

As you can see, the response is array. I want to display them in grid column cells side by side.

Image

The Response:

Image

John de Quarius
Posts: 0
Joined: Fri Dec 11, 2015 7:16 pm

Mapping Array to Grid Component(Columns)

Try doing this...
add a div element inside the list item and apply a css rule to the dive and the image element.

or you could set the image element to inline inside your list.

taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

Mapping Array to Grid Component(Columns)

Thanks John, but couldn't make it work.

Return to “Issues”