Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yajamanam 36 posts 106 karma points
    Dec 01, 2017 @ 12:17
    Yajamanam
    0

    Creting CustumGrid implemnetation

    I Have a Html content. I want to custumize the grid layout of Bootstap default css exp: umb-grid class. I want to create new class.

    issues: if I use existing gird. it will render with umbraco grid classes and render my html content.

    please suggest me how to create custom gird with css to be of my html template.

  • Marc Goodson 2141 posts 14324 karma points MVP 8x c-trib
    Dec 03, 2017 @ 11:41
    Marc Goodson
    0

    Hi Pradeep

    Within your site in the /Views/Partials/Grid folder is a selection of 'grid renderer' files. These are the files that write out the markup when you use the grid.

    eg. Bootstrap3.cshtml

    If you take a copy of one of these files and create PradeepGrid.cshtml

    you could then change the markup and styles in here to suit how you wish to render the grid.

    Then in your view when you are writing out the grid content, you tell Umbraco to use your Grid Renderer:

    @Html.GetGridHtml(Model.Content, "propertyAlias", "PradeepGrid")

    So hopefully that approach gives you control over what you are trying to do, it's annoying to have to do this if you only want to add one css class to a column row, there is an Issue on the issue tracker:

    http://issues.umbraco.org/issue/U4-6585

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft