Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Column autosize not autosizing

Caveats first. I haven't downloaded the latest version but I have been through the version history and see no mention of a fix for this so maybe it's been addressed and not mentioned or maybe just never been noticed.

By default, whenever initialising a reporttable using columnlist, I explicitly set the autosize to true, (yes even though that's the default setting anyway).
Works well, so that's good.
Except...
We have a scenario where we may reset the columnlist. A user may change other settings on the form requiring the reporttable to be reloaded not only with new data but potentially new (or less) columns. The same initialisation routine is called as originally, the same autosize flags are set within columnlist, but they no longer take effect. The columns display as per their explicit column width and don't autosize to fit the table.

I tried setting columnlist to null before applying the new columnlist but to no avail.

Comments

  • Sorry for not responding on this. I have rather large backlog of issues to look into, and I've added this to my list so I won't let it slip through the cracks. I do not, sadly, have an immediate solution for you.
  • No worries Kev. Not a dealbreaker.
    The most annoying thing about this one was, it felt familiar but then I couldn't find any reference to it anywhere.

    If it's now on your list, then I'll take it as not something simple I was overlooking.
    And at this stage, that's good enough for me.
  • Finally getting to this. I know it's been ages. I should have mentioned this back when you posted, but setting the HorizontalScroll property disables auto-sizing of columns. The docs mention in this in some places, but not in the ColumnList property, so I updated that page to include this caveat.
  • Thanks for the reminder. I was aware of that at some point in time.
    Curiously though, the initialisation routine sets the horizontalscroll to true yet the columns are autosized the first time around.
    Subsequent calls to columnlist then behave consistent to what you have mentioned here.

    I've forgotten which form it was that presented the issue but when I remember, I'll retest with an eye on the horizontalscroll property.
Sign In or Register to comment.