Copied to clipboard

Flag this post as spam?

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


  • Thomas Egebrand Gram 63 posts 138 karma points
    Feb 03, 2016 @ 14:17
    Thomas Egebrand Gram
    0

    Boolean grid configuration to add a conditional class

    Howdy!

    I've been messing around with the Grid datatype a bit, trying to make it more controllable.

    I would like to add a boolean to the configuration of the rows, so that the editor may choose to make the row fluid. Basically what i want in my custom grid is this:

    var cssClass = (row.fluid) ? "container-fluid" : "container";
    

    I have tried adding it in the JSON config as a boolean, but unfortunately that only returns either a 0 or a 1. The radiobuttonlist is no good either, as i want -nothing- to be returned unless it's similar to above.

    I am open to suggestions. :-) Thanks!

    // Thomas

  • Mike Chambers 636 posts 1253 karma points c-trib
    Feb 03, 2016 @ 17:40
    Mike Chambers
    0

    Maybe missing the issue.. but

    var cssClass = (row.fluid == "1") ? "container-fluid" : "container";

  • Thomas Egebrand Gram 63 posts 138 karma points
    Feb 04, 2016 @ 13:17
    Thomas Egebrand Gram
    0

    Thanks for the reply! :-) A little bit yes - the issue is getting the actual data out of the row, the above was just an example.

Please Sign in or register to post replies

Write your reply to:

Draft