We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Column width stretched when hiding other columns

Thread ID:





101613 Nov 8,2011 09:16 AM UTC Feb 10,2012 04:14 AM UTC ASP.NET MVC (Classic) 5
Tags: Grid
Asked On November 8, 2011 09:16 AM UTC


Im working with the version with server mode and the gridbuilder.
I have several groups of columns, with a fixed width for each Column, that need to be hidden or shown through a click on the corresponding group in a listbox -> please refer to the screenshots I attached.
In those screenshots you can see that when I hide the first 5 Columns contained in the first group the other columns are stretched but the headers are not, resulting in a displaced grid.

The remaining visible Columns should instead keep their width they had before.

I currently show / hide the Columns on the clientside through javascript the moment the group is selected / deselected in the listbox with this code:

var gridObj = $find("Grid");
while ( currentindex < endindex ){
currentindex ++;

Thanks in advance,


Ranjithkumar R G [Syncfusion]
Replied On November 11, 2011 05:51 AM UTC

Hi Julian ,

Thanks for using Syncfusion products.

We are sorry for inconvenience caused. We are unable to reproduce the issue. We have prepared a simple sample, video demonstrating the working of the sample and the same can be downloaded from the following links.

Sample link:

Video link:

Could you please try the above sample and get back to us whether you are able to reproduce the issue? If not, could you please give us your code snippet of your project which reproduced the issue or by reproducing the issue in the above sample so that we could sort out the issue and provide you with solution. The information provided would be of great help in resolving the issue.

Please let us know if any concerns.


Replied On November 11, 2011 03:14 PM UTC

Hey Ranjithkumar,

Thanks for your response and the sample.
I actually found 2 different ways to reproduce the problem

1. Giving all columns a fixed width with .Width(xxx)
-> I've modified the sample this way, along with two buttons to hide / show the fields that were hidden on pageload in the original sample.

2. When the width of all columns together is smaller than the gridwidth. In this case the problem occurs even when there are columns without fixed width

Since I could now find out the exact circumstances in which the problem occurs I managed to come up with a workaround:
I Add an additional Column at the very end of the grid with an empty headertext and no fixed width.

Like this:

This is enough for my project to work but it would be great to either document the requirement of a "fillerfield" or to fix the problem when all columns have a fixed width.

Regards, Julian


Ranjithkumar R G [Syncfusion]
Replied On November 16, 2011 04:05 AM UTC

Hi Julian,

Thanks for your update.

We are glad to know that you found a workaround to fix the problem.
We would like to analyze more on this issue and then we will update the documentation regarding the issue.

Please let us know if you have any concern.


Jason Beal
Replied On January 26, 2012 09:14 PM UTC

I have also experienced this several times. We are also hiding particular columns. After doing some digging with Firebug via inspecting the elements and examining the widths of elements under the GridHeader div and the GridContent div, I have found that the widths of the GridHeader and GridContent divs do not match.

The GridHeader has a style set on each element to set its width, however, when clicking on the col in Firebug, it shows the actual width to be much higher than the style width.

The GridContent also has a style set on each element to set its width and when clicking on the col in Firebug, it shows the actual width to be the same as the style width.

Our resize column issue is still apparent.

Ranjithkumar R G [Syncfusion]
Replied On February 10, 2012 04:14 AM UTC

Hi Jason,

Sorry for the delay in getting back to you. We suggest you to create an incident regarding your query in Direct Trac by using your Direct Trac account as your query as it is related to source level issue, so that we will be able to provide you the patch if the development team confirms it as an issue and fix it.

Please let us know if you have any concern.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon