C1FlexGrid StarWidth in column designer

Posted by: wknauf on 11 May 2020, 2:04 am EST

  • Posted 11 May 2020, 2:04 am EST

    Hi C1,

    when setting a StarWidth in the grid column designer, the col display width shrinks to “0” and it is not visible any more. It can still be selected in the combobox.

    In my sample, there was enough space left in the client area to apply the StarWidth to the col, but it shrinks anyway.

    I suggest to always display it, even if no MinWidth is set - with a default width of e.g. 100 pixel.

    A similar problem is the handling of invisible cols (also hidden, though at design time it would be more helpful to show them, e.g. with a gray background). But this issue exists as long as I know the grid, so I don’t request a change here ;-).

    Best regards

    Wolfgang

  • Posted 11 May 2020, 8:59 am EST - Updated 3 October 2022, 11:55 pm EST

    Hi Wolfgang,

    The StarWidth property is specially designed to work when it is set for all the column exists in the FlexGrid.

    If you set it for more than 1 column then it will not show a column with 0 width.

    I have attached a GIF showing the same if you are doing something else as shown in the GIF then please let us know the steps that have to be taken to replicate the issue.

    Regards,

    Prabhat Sharma.

  • Posted 11 May 2020, 10:10 am EST - Updated 13 August 2025, 11:10 am EST

    Sorry, it was a bit my own error: the width of the grid cols in the designer is calculated based on the width of the parent control.

    I designed a UserControl which contains only a single C1FlexGrid with Dock=Fill. This user control has the default size because it is dragged to the proper size in the place where it is used.

    In my sample, the column width sum is larger than the parent size, so the column gets invisible when setting the StarWidth, though the column designer window is much wider than the parent control.

    I understand what’s happening here, and I am not sure whether I should call it a bug. But I don’t like the fact that the column is invisible afterwards. Is there anything you could do to show them at design time?

    Best regards

    Wolfgang

  • Posted 12 May 2020, 4:39 am EST - Updated 3 October 2022, 11:55 pm EST

    Hi Wolfgang,

    As I said earlier the StarWidth property is specially designed to work when it is set for all the columns exists in the FlexGrid and if you set it for more than 1 column then it will not show a column with 0 widths.

    In your attached screenshot, initially, two columns are visible only so it is not visible when setting the StarWidth of Col 2. In this case, you can adjust the control’s width or use the MinSize property of the Cols to be able to see the second column. I have shown the same in the attached GIF, please have a look.

    If you have any other understanding then please let us know.

    Regards,

    Prabhat Sharma.

  • Posted 12 May 2020, 9:04 am EST

    Hi Prabhat,

    yes, I understand this - my initial post was based on a misunderstanding of the relation beetween control width und column designer behaviour.

    Anyway, for the future I suggest to never fully hide those columns in the designer or at least size the based on the width of the column designer window.

    And if this is changed, please consider showing also invisible cols in designer - with e.g. a different background.

    Best regards

    Wolfgang

  • Posted 13 May 2020, 12:13 am EST

    Hi Wolfgang,

    We have forwarded your request to the developers and ask them to add this feature if they found it feasible. We will let you know once we get any update on this from their end.

    [Internal Tracking ID:435029]

    Regards,

    Prabhat Sharma.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels