Cell padding for very left column different

Posted by: daniel.koffler on 6 April 2023, 3:15 am EST

    • Post Options:
    • Link

    Posted 6 April 2023, 3:15 am EST

    Hello,

    I am setting cell padding like this

    CellStyle="@("padding: 2px;")"

    For some reason the very left column has a “padding-left” of 16px. It seems that the CellStyle is ignored just for first column.

    Kindly let me know how I can set padding for this column as well.

    Thank you

    Daniel

  • Posted 11 April 2023, 9:37 am EST

    Hi Daniel,

    We are not sure why this issue is occurring. A sample depicting your issue would help us in debugging the issue and assisting you.

    However, instead of setting the padding from CellStyle, use the “flexgrid-cell” class to set the CSS.

    .flexgrid-cell{
         padding: 2px;
    }

    Regards,

    Manish Gupta

  • Posted 11 April 2023, 5:22 pm EST

    I forgot to mention that my very first column is fixed. Maybe its related to this?

  • Posted 13 April 2023, 7:50 am EST

    Hi Daniel,

    We are sorry but we are unable to replicate the issue on our end. Could you please check the attached sample and modify the sample depicting your issue.

    Also, please check for the CellFactory class if used in your application.

    Regards,

    Manish Gupta

    Flexgrid_padding_frozencolumn.zip

  • Posted 15 April 2023, 6:38 pm EST

    Hello,

    please find enclosed an example showing the issue.

    It sees to be related to the grouping. I want to have a total sum in the grid and have implemented it with grouping by a dummy column.

    Is there another way of doing it?

    For the total sum there is no need for a left indent.

    Thank you

    DanielComponentOneBlazorIssue_FirstColumnPadding.zip

  • Posted 16 April 2023, 5:02 pm EST

    Hi,

    The issue is because of the Grouping applied for FlexGrid. To remove the extra padding from the first column, please use the following CSS code:

    <style>
        .flexgrid-cell{
            padding:2px !important;
        }
    </style>

    Regards,

    Manish Gupta

  • Posted 16 April 2023, 6:24 pm EST

    Hello,

    yes, its related to grouping.

    I want to have total sums in the grid and I implemented it via grouping.

    Is that best practice or is there another way of doing it, which does not have the side-effect with padding?

    If I use “real” grouping I want the padding OOTB.

    Thank you

    Daniel

  • Posted 18 April 2023, 5:57 pm EST

    Hi Daniel,

    Unfortunately, this is the only way for adding the Aggregate for FlexGrid columns until the ColumnFooters are not available.

    In the meantime, please use the above workaround suggested in the previous response.

    Regards,

    Manish Gupta

  • Posted 18 April 2023, 5:58 pm EST

    Thank you!

Need extra support?

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

Learn More

Forum Channels