Removing .k-grid-footer break column width

1 Answer 159 Views
Grid
Eric
Top achievements
Rank 2
Iron
Iron
Eric asked on 12 May 2023, 12:10 PM | edited on 12 May 2023, 01:22 PM

I've tracked the problem I'm facing down to removing the gridfooter.  With the code I'm given it's easier to always create the gridfooter and then remove it in the cases it doesn't need to be there.

In the scenarios where I don't remove the gridfooter the column widths are fine.  When I remove the gridfooter then the columns no longer respect the width.  I tracked it down to one item.

If I leave the gridfooter alone this is on the web page.  You can see the colgroup with the widths.

When I remove the gridfooter the colwidth values appeared to be wiped out.

Any idea why this is happening or another solution?  Hiding the grid footer on document ready doesn't appear to be a good solution as when the grid refreshes due to a sort the footer reappears.

I should also add that removing the footer appears to prevent the grid from painting properly and that items in the grid do not appear until you sort a column.

I was just playing around more and found if I add the col entry back in the colgroup after removing the footer that it formats properly, however I need to know why removing the footer is removing the values in the colgroup.

Thanks

1 Answer, 1 is accepted

Sort by
0
Stoyan
Telerik team
answered on 17 May 2023, 08:58 AM

Hi Eric,

I've tested the reported behavior in this Telerik REPL by adding the following line:

$(".k-grid-footer").remove();

to the onDataBound handler of the Grid. But unfortunately, I wasn't able to reproduce the reported behavior.

I suspect the reported issue might have occurred in older version of the product since the Grid rendering has been updated twice recently - in R1 2022 and again in R1 2023.

Could you please share additional information in regard to the configuration of the Component and the approach you use to remove the footer to enable me to analyze further?

Regards,
Stoyan
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.
Tags
Grid
Asked by
Eric
Top achievements
Rank 2
Iron
Iron
Answers by
Stoyan
Telerik team
Share this question
or