Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Autowidth/Autoheight and IE problems
22/07/2009
04:20
Avatar
Romyn
Member
Members
Forum Posts: 45
Member Since:
13/06/2009
sp_UserOfflineSmall Offline

Hi again Embarassed,

I have a setup that has 2 grids within an Accordian that is inside a UI-Layout pane - I've left all that in just in case it's relevant in any way - I have a couple of problems that show up within IE (6&7).

The first can be seen on the following page:-

http://www.thekmz.co.uk/GEPlug.....test3a.htm

The grids are set to autowidth:true and height:'auto'.

(Having 2 grids means I can't use height:'100%' as that throw the 2nd grid down the page and gives a vertical scroll)

When the Layout-Pane is resized (by dragging the grey vertical bar) the Accordian is resized and so are the grids (using setGridWidth to 5px less than the accordian's outerwidth). This works as expected in FF but in IE making the Pane larger (drag left) the Grids increase in width OK but if I then make it smaller the Grids don't resize and I get a horiz scroll even if the columns should fit.

(I also get a vertical scroll in IE when initially loading the page which I can't seem to be able to get rid of - I can't see a reason why that is there - it's not in FF but may not be due to jqGrid - I don't know?)

The second problem is related to height:auto and can be seen on this page:-

http://www.thekmz.co.uk/GEPlug.....test3b.htm

This setup is exactly the same as the first but in this one I've made the final column in the first grid wider so that it will give a horiz scroll when initially loaded. In FF it's looks fine and the autoheight works and I can see all the records. In IE however I not only get a horiz scroll but also a vertical one and all the records are not visible. I don't know if this is related in any way to problem 1 but I can't figure out a way to solve it without (maybe) setting and recalculating the height in code.

I've searched the forum, promise, as much as I can but can't seem to find a fix so any help would be greatly appreciated.

(I'm using 3.5 build 11)

Thanks and regards

Romyn

27/07/2009
03:01
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

For the first issue - it is a not jqGrid problem, but a way how diffrent browsers calculate the width - in this case IE.

Maybe you should try not with width(), but with innerWidth().

function resizeGridWidths() {
 outerwidth = $("#accordion").innerWidth()- 5;
 $("#grid_1").setGridWidth(outerwidth);
 $("#grid_2").setGridWidth(outerwidth);
}

For the second issue - could you please try with build 12. ALso I can not remember, but maybe you should try with the last vesrion from GitHub.

Thanks

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

28/07/2009
20:58
Avatar
Romyn
Member
Members
Forum Posts: 45
Member Since:
13/06/2009
sp_UserOfflineSmall Offline

Thanks for the reply Tony.

You're right - issue 1 does seem to be a problem with either the UI-Accordion or the UI-Layout control - got to work out which now. I did try you're suggestion vis-a-vis width instead of innerwidth but it made no difference unfortunately. I've added an Alert in that gives the width when the pane is resized and it appears that with IE the width just decreases by 1px no matter how much the pane size is decreased by (FF shows the correct value in the alert). Increasing the width is fine in both. That's a clue at least.

As for the 2nd issue - I've tried build 12 and now have loaded the latest from GitHub behind it but it still does the same thing - not showing all records in IE even though set to autoheight. It seems as though IE doesn't take into account the horiz scrollbar although FF does.

Any ideas?

29/07/2009
01:20
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

For the second. Could not remember, but I think there was a patch here in forum for this issue. Will try to find it - the correction is in css.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

29/07/2009
10:11
Avatar
Romyn
Member
Members
Forum Posts: 45
Member Since:
13/06/2009
sp_UserOfflineSmall Offline

Thanks - that would be useful. I've tried searching for it but can't find it using what I thought were obvious search terms.

(The 1st one I've now posted on the jQuery-UI googlegroup - hopefully someone will come to my rescue over there).

Regards

Romyn

30/07/2009
04:10
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Could you please look this:

http://www.trirand.com/blog/?p.....mment-3198

and let me known if this resolve the problem.

Also here is the message:

...

For those of you having problems when you only have one row, and the scrollbars appear on Internet Explorer, here is a quick hack… just add it on some function (like updatepager() on grid.base.js

if ($.browser.msie) {
$a = $(’.ui-jqgrid .ui-jqgrid-bdiv’);
$a.css(’padding’, ‘0 0 15px 0′);
if(ts.p.height == ‘100%’){
$a.css(’overflow-y’, ‘hidden’);
}
}

...

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

31/07/2009
03:32
Avatar
hpoe
hpoe
Member
Members
Forum Posts: 29
Member Since:
07/03/2009
sp_UserOfflineSmall Offline

tony said:

Hello,

Could you please look this:

http://www.trirand.com/blog/?p.....mment-3198

and let me known if this resolve the problem.

Also here is the message:

For those of you having problems when you only have one row, and the scrollbars appear on Internet Explorer, here is a quick hack… just add it on some function (like updatepager() on grid.base.js

if ($.browser.msie) {
$a = $(’.ui-jqgrid .ui-jqgrid-bdiv’);
$a.css(’padding’, ‘0 0 15px 0′);
if(ts.p.height == ‘100%’){
$a.css(’overflow-y’, ‘hidden’);
}
}

Regards

Tony


Hello Tony,

after the code line 1094 original:

            if($.isFunction(ts.p.gridComplete)) {ts.p.gridComplete();}

I added the following

/* ie browser fix */
            if ($.browser.msie) {
                $a = $('.ui-jqgrid .ui-jqgrid-bdiv');
                $a.css('padding', '0 0 15px 0');
                if(ts.p.height == '100%'){
                    $a.css('overflow-y', 'hidden');
                }
            }
/* end ie browser fix */

And it seems to work! I will make more tests, but I am optimistic.

Regards

HP Oe

31/07/2009
08:27
Avatar
Romyn
Member
Members
Forum Posts: 45
Member Since:
13/06/2009
sp_UserOfflineSmall Offline

Thanks for digging that out Tony,

For now I've added

    if ($.browser.msie) {
        $a = $(".ui-jqgrid .ui-jqgrid-bdiv");
        $a.css("padding", "0 0 15px 0");
        $a.css("overflow-y", "hidden");
    }

to my resizeGridWidths function as I prefer to leave your js files as they are - one more thing not to have to remember to do when I next update to a later version.

That's seems to have done the trick.

Regards

Romyn

04/08/2009
02:06
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello Romyn,

Not sure If I include this fix. It works ok when you have shrinkToFit set to false, but when this parameter is set to true we have a empty space bettwen the last row and the pager, which does not look good. I will publish this solution in HOWTO section of the grid, but will try to search a better one.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

06/10/2009
10:18
Avatar
Tim
Guest
Guests

tony said:

Hello Romyn,

Not sure If I include this fix. It works ok when you have shrinkToFit set to false, but when this parameter is set to true we have a empty space bettwen the last row and the pager, which does not look good. I will publish this solution in HOWTO section of the grid, but will try to search a better one.

Regards

Tony


Well, something I did to tweak this was to also only apply this fix for IE7 and lower, IE8 has this issue fixed.

/* ie browser fix */

if ($.browser.msie && $.browser.version<8) {

$a = $('.ui-jqgrid .ui-jqgrid-bdiv');

$a.css('padding', '0 0 15px 0');

if(ts.p.height == '100%'){

$a.css('overflow-y', 'hidden');

}

}

/* end ie browser fix */

22/10/2009
16:15
Avatar
jmav
Member
Members
Forum Posts: 34
Member Since:
16/10/2009
sp_UserOfflineSmall Offline
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
71 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information