Allow setting cell height per row in gridview

This might be a little specific, but I've personally run into it numerous times (actually almost every time I go to use gridview...).

Being able to have dynamic grid cell sizes (within reason) would be a great addition I feel. One simple use case is a 1 column, multi-row grid, each cell containing varying amounts of text lengths in them. To get this looking good now, you'd have to either A) put all of your text in a single cell and use a fixed scroll distance to view it, or B) set every cell height to the same as the height of the cell with the most text content (causing some pretty undesirable large/uneven empty "space" between cells). These aren't terrible workarounds, but both of them nullify using a lot of the other cool features of gridview, like the horizontal divider and the cell padding.

Just add this to my ongoing trend of being the only one on the forums posting about gridview :sweat_smile:

2 Likes

Grid view is great! It has saved me a ton of time! I can see how that kind flexibility would be great.

Brainstorming still more workarounds... what if the cell height equaled a single line of text, so a 12-line paragraph was 12 cells tall? Highlights and dividers would call for some creativity.

Thinking out loud... In gridview:drawcell you could draw past the bounds of a given cell. So maybe a 12-line paragraph could still be ONE cell—drawing into the space "belonging to" 11 empty, never-drawn cells below it?

But such hacks will never be as useful as built-in functionality!

1 Like

I never would have considered this, it sounds like a pretty viable workaround that just requires a little extra cell management....

I think I'll try it out for now !

1 Like

I can definitely see the value of variable cell sizes, however my main concern is that it would negatively impact performance. If cell sizes aren't predicable it becomes a lot more expensive to calculate the position of any given cell or scroll position. I'll give it some more thought though!

2 Likes

I had a feeling there was a good reason!

Let us know if you come up with something, I've got 3 separate projects that would benefit nicely from this. :raised_hands:t5: