Tony,
In trying to fix the size to a target I get the best results with the following formula:
gridWidth = target – (2 * padding) * nrCols;
The bordersize has no influence.
Stil I mis a pixel here and there, probably due to rounding effects of your recalculation.
Any plans to support width=100%? That would solve it completely.
Regards,
Ton.
Tony,
Your documention doesnot solve my problem. I have got pages with several grids below each other with different numbers of columns. I would like the grids to be exactly the same size in pixels. Is there a way to achieve this?
Regards,
Ton.
Hi Tony,
Thanks for the effort. It indeed looks interesting, but this is not a simple substitution. For the moment I opt for the alert script.
Ton.
Tony,
Line 2664.
I switched:
var xml = window.ActiveXObject ? new ActiveXObject(“Microsoft.XMLHTTP”) : new XMLHttpRequest();
for:
var xml = window.ActiveXObject ? new ActiveXObject(“Msxml2.XMLHTTP”) : new XMLHttpRequest();
same result.
Ton.
Tony,
Googling around I found your suggested code. But it didnot work.
I found some more, but so far no luck.
Ton.
Tony,
I stumbled on your suggested code when ‘Googling’ but it doesnot work.
I found some more, but none of them seem to work.
Ton.
Tony,
I checked 3.1 in IE 6 and got the same problems. That suggested it had to be on my side. I tweaked the security tabs. Enabling ‘Initialize and script ActiveX control not marked as safe’ did the job. Then 3.2 worked as well. But I cannot ask all the users to do this. Do you know about this problem?
Ton.
Tony,
In IE 6 the problem is not restricted to the hidden columns. It is a general problem.
Ton.
Tony,
You are getting close. IE 7 is ok, but IE 6 is not. There an error is generated: ‘Automation server can’t create object’ and the tables keep stay in ‘loading’ mode.
Ton.
Tony,
I don’t have a IE6 at hand. I can try next monday.
Ton.
Tony,
Below the javascript code.
It works fine in 3.1.
It works fine in 3.2 Beta2 Firefox, but not in IE7. (Illegal argument )
If I remove the ‘hidden:true’ It works.
Regards,
Ton.
$(“#personDomain”).jqGrid({
url: ‘../ws/personDomains.jsp?stm=’ + (new Date()).valueOf(),
datatype: “xml”,
colNames:[lng_domain, “id”],
colModel:[
{name:”name”,index:”name”, width:200, xmlmap:”name”},
{name:”id”,index:”id”, width:10, hidden:true, xmlmap:”id”}
],
width:rightColWidth,
height:”100%”,
shrinkToFit:true,
rowNum:10,
rowList:[10,20,30],
imgpath: gridimgpath,
viewrecords: true,
loadonce: true,
loadComplete: function(){
$(“#personDomain tr”).css(“cursor”,”pointer”);
},
caption: ” + lng_domains + ”,
onSelectRow: function(id){
window.location = “home.jsp?domain=” + $(“#personDomain”).getRowData(id).id + ‘&stm=’ + (new Date()).valueOf();
},
xmlReader: {
root : “ResultSet”,
row: “row”,
repeatitems: false
}
});
Tony,
Probably it is in tables with hidden columns. The others work ok.
Succes.
Ton.
Tony,
Beta 2 has the same error in IE7.
Some tables are displayed and some are not.
So far I have no errors in Firefox.
Regards,
Ton.
Tony,
Hate to rush you, but what is your planning on this issue?
I have got a designer complaining!!!
Kind regards,
Ton.
Hi Tony,
‘
Do you mean that I should specify a width parameter in the JQgrid function? That doesn’t fix the problem. It raises another issue. It would be nice if this width would be the actual width of the table. Now it depends on the number of columns. I would like to fix the width of several tables in a list and make global changes depending on the window size. An alternative option could be to use width:”100%”, but that doesnot work.
Regard,
Ton.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top