0
votes

I have slickgrid table with some data in it. Im populating it using RoR app, where i generate json which passing to slickgrid table builder. I've found this example http://mleibman.github.io/SlickGrid/examples/example5-collapsing.html, but i can't figure out how to add indents(preferably it'd be css class, which i can add on my backend). I've tried to add cssClasses to slickgrid row, but this doesnt append selected class

What am i doing wrong?

1

1 Answers

0
votes

Without much information from your problem, you can do a simple trick:

Add a level/number pair (this indicates the deep of the object) to every item of generated json. The slickgrid example you found is using a span element to set the indent. So, you need to do something like this:

<span style="display:inline-block;height:1px;width:"+(15*jsonObject['level'])+"px"></span>

If not works for you, please post more information.