andycrespo27 / flexigrid

Automatically exported from code.google.com/p/flexigrid
0 stars 0 forks source link

Column resizing in latest Flexigrid with latest jQuery #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. grab any dragline to change column width
2. drag to change size
3. release the dragline

What is the expected output? What do you see instead?

I would expect the column to be resized, but instead the previous column is 
being resized. To be more clear, the header for the column works perfectly, but 
the column cells below it don't change, and the column cells one column to the 
left change to match the header of the actual column being changed.

What version of the product are you using? On what operating system?
The latest download, working on CentOS but using various OS/browsers to view 
and manipulate the table.

Please provide any additional information below.
I have attached a patched version for your perusal. The relevant code is found 
on lines 247 thru 252 in the patched version.

Original issue reported on code.google.com by jay...@gmail.com on 11 Feb 2011 at 5:03

GoogleCodeExporter commented 8 years ago
Changed the offered fix from the entire modified js to a patch file created 
with svn diff

Original comment by jay...@gmail.com on 23 Feb 2011 at 6:57

Attachments:

GoogleCodeExporter commented 8 years ago
I'm having the same issue but your fix didn't work for me. I'm using jquery 
1.6.1 and tested with the latest version of explorer, chrome and firefox.

Original comment by james.ma...@gmail.com on 20 Jun 2011 at 8:00

GoogleCodeExporter commented 8 years ago
Tried JQuery version 1.4.1, 1.4.4, 1.5.1 and the problem still remain.

Original comment by james.ma...@gmail.com on 20 Jun 2011 at 8:25

GoogleCodeExporter commented 8 years ago
Solved the problem only by removing my <thead> and <tbody> tags. Now everything 
is fine.

Original comment by james.ma...@gmail.com on 20 Jun 2011 at 10:01

GoogleCodeExporter commented 8 years ago
i think the issue is when you have multiple div inside each others for a TD so 
you need to make sure to select the first div inside n TD.
so using the below line of code in the location specified in the patch will 
resolve the issue.
$('td:visible:eq(' + (n) + ') div:eq(0)',this).css('width',nw);

Original comment by imad.a...@gmail.com on 23 Sep 2011 at 9:28

GoogleCodeExporter commented 8 years ago
I think Comment 5 is correct in that it is nested div's causing the issue here 
however this fix didn't work for me.
I added a class to the div's created by flexigrid at line 600

var tdDiv = document.createElement('div');
$(tdDiv).addClass('gc'); //My mod
var n = $('td', $(this).parent()).index(this);

and then added the class selector to the line mentioned above:
$('td:visible div.gc:eq(' + n + ')', this).css('width', nw);

Original comment by Olly.p.j...@gmail.com on 4 Apr 2012 at 10:04