is it possible to apply an alternating style to the rows of a gridlayout?
I can apply the styles to each row container manually but like'd to do this without a content editor needing to do this.
Somewhere must be a logic that pulls the rows with a foreach, this would be where I insert my own logic to determine the appropiate style.
Grid Layouts is rendered with a partial view. By default this is /Views/Partials/Grid/Bootstrap3.cshtml you can createyour own rendering by copying this file naming it something appropriate. Now you can modify the partial view all you want.
When you render the grid you then need to call your custom rendering instead of the default one. If you named it: /Views/Partials/Grid/SomethingAppropriate.cshtml then you would do:
Alternating row style in GridLayout
Hello,
is it possible to apply an alternating style to the rows of a gridlayout? I can apply the styles to each row container manually but like'd to do this without a content editor needing to do this. Somewhere must be a logic that pulls the rows with a foreach, this would be where I insert my own logic to determine the appropiate style.
Regards
Anja
Hi Anja
Grid Layouts is rendered with a partial view. By default this is
/Views/Partials/Grid/Bootstrap3.cshtml
you can createyour own rendering by copying this file naming it something appropriate. Now you can modify the partial view all you want.When you render the grid you then need to call your custom rendering instead of the default one. If you named it:
/Views/Partials/Grid/SomethingAppropriate.cshtml
then you would do:See the documentation for more info.
Hope that helps
/Rune
Nice! Thank you.
is working on a reply...