Configure Grid with 2 layouts: Container and Container Fluid
Hi,
Is it possible to give the editor the option to choose between using the:
Bootstrap 3 Container
Bootstrap 3 Container Fluid
In other words, can I have 2 different layouts on the same grid configuration such that one uses normal Container and the other uses Container Fluid (Full Width)?
Thanks. But will I be able to allow editor to choose whether to use this or that?
As you know its already available in Bootstrap 3, but from what I saw, in the Template, you just ask the Grid to render using either Container or Container Fluid. So, how can this parametrized so that Editors can choose this or that way of rendering.
You'll see in the code that the grid editor is looping through the rows.
~/Views/Partials/Grid/*.cshtml
If you query the row.name. You'll notice it is the alias you used in the grid editor settings in the back office. Use that name to determine in the grid rendering whether to use container or container-fluid.
Configure Grid with 2 layouts: Container and Container Fluid
Hi,
Is it possible to give the editor the option to choose between using the:
In other words, can I have 2 different layouts on the same grid configuration such that one uses normal Container and the other uses Container Fluid (Full Width)?
Thanks /Bilal
Yes, you can build your grid rendering any way you want.
Dig into the view in /views/partials/grid/bootstrap3.cshtml to see how it's built.
Thanks. But will I be able to allow editor to choose whether to use this or that?
As you know its already available in Bootstrap 3, but from what I saw, in the Template, you just ask the Grid to render using either Container or Container Fluid. So, how can this parametrized so that Editors can choose this or that way of rendering.
Thanks /Bilal
Hi,
The answer is yes.
You'll see in the code that the grid editor is looping through the rows.
If you query the row.name. You'll notice it is the alias you used in the grid editor settings in the back office. Use that name to determine in the grid rendering whether to use container or container-fluid.
Modify the renderRow helper to something like...
Then when looping through the rows do something like this...
I know this is an old post. But I hate leaving things kinda unanswered.
I also encountered this
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.