Page 1 of 1

Adding a line to separate sections of a grid

Posted: Fri Nov 06, 2020 2:24 pm
by JayGoo83
Is there a way to add a line to make a noticeable separation in a grid?
I currently have a grid that is being built from a backend table. There are 5 sections. What I would like to do be able to do is that when the RPG picks up that the section has changed, some sort of black line can be parsed to the display file to indicate that a new section has begun.
The problem with just dropping a line in the design editor is that the sections are dynamic, and rows can be added or deleted, and I was hoping to reflect that dynamic functionality. Thanks in advance.

Re: Adding a line to separate sections of a grid

Posted: Fri Nov 06, 2020 2:51 pm
by Scott Klement
Have you thought about using the background color for this? Changing the background each time a section changes seems like it would work very well for what you describe.

As for adding a divider line.. I can't think of a really easy/good way to do that. I suppose you could use something like the line widget and condition its visibility based on a field in the subfile... seems clunky to me, though.

Re: Adding a line to separate sections of a grid

Posted: Fri Nov 06, 2020 3:46 pm
by JayGoo83
I thought about using the background color. And it works to a certain point. I didn't like that this results in an entire row being "blacked out", which the row height is 28px. I kind of just wanted like a 4px line. Also this means i have to bind the hover which changes the background color, and also the grid lines themselves show. I am sure it can be done with a lot more CSS, but i was just hoping there was an easy fix that I wasn't aware of.

Re: Adding a line to separate sections of a grid

Posted: Fri Nov 06, 2020 4:53 pm
by Scott Klement
I didn't mean that the background color would, itself, be a line... I meant that the background color would highlight the transition between sections. Something similar to this:
colorcat.png
colorcat.png (92.13 KiB) Viewed 1045 times

Re: Adding a line to separate sections of a grid

Posted: Fri Nov 06, 2020 5:39 pm
by JayGoo83
Oh I didn't thank of that. That is a great idea. Thanks!