Forum


10:00

07/03/2009

Hi
Is there a known issue with onCellSelect on cell with image and ie7?
all my columns are non-editable.
in Firefox reaction to onRightClickRow, ondblClickRow and onCellSelect.
in IE7 only to ondblClickRow and onRightClickRow. onCellSelect is not responding.
On all other cells onCellSelect fires also in ie7!
in the Column where i want to use onCellSelect there is an image (basket).
The problem is that most of the users of our shop software is using ie6/ie7 together over 90%.
Is there anything i can do differently?
var id=0;
var parent_id=â€196″;
var dim_nr=â€";
var oURL=â€";
jQuery().ready(function() {
jQuery(â€#listâ€).jqGrid({
url:’get_product.cfc?CFID=2706&CFTOKEN=27757645&method=getMasterproductInfo&id_masterproduct=17182′,
datatype: ‘json’,
mtype: ‘GET’,
colNames:['ID_O_PRODUCT','Artikel Nr','L
mm','k
mm','b
mm','s
mm','d
','dk
mm','CHF / 100STK',''],
colModel:[{name:'ID_O_PRODUCT',index:'ID_O_PRODUCT',key:true,hidden:true, search:false},
{name:'PRODUCT_NUMBER',index:'PRODUCT_NUMBER',sortable:false, width:65, align:'left'},
{name:'PA1.VALUE_1',index:'PA1.VALUE_1',width:90,align:'center',sortable:false,edittype:'select',editoptions:{value:":All;:;100:100;110:110;120:120;130:130;140:140;150:150;160:160;170:170;180:180;200:200;220:220;240:240;25:25;260:260;280:280;30:30;300:300;35:35;40:40;45:45;50:50;55:55;60:60;65:65;70:70;75:75;80:80;85:85;90:90"}},
{name:'PA2.VALUE_1',index:'PA2.VALUE_1',width:90,align:'center',sortable:false,edittype:'select',editoptions:{value:":All;:;10:10;12:12;14:14;16:16;18:18;20:20;24:24;27:27;3:3;30:30;36:36;4:4;48:48;5:5;6:6;8:8"}},
{name:'PA3.VALUE_1',index:'PA3.VALUE_1',width:90,align:'center',sortable:false,edittype:'select',editoptions:{value:":All;:;108:108;18:18;20:20;22:22;24:24;28:28;32:32;36:36;40:40;44:44;48:48;52:52;60:60;66:66;72:72;84:84"}},
{name:'PA4.VALUE_1',index:'PA4.VALUE_1',width:90,align:'center',sortable:false,edittype:'select',editoptions:{value:":All;:;10:10;12:12;14:14;17:17;19:19;2.5:2.5;22:22;27:27;3:3;36:36;4:4;5:5;6:6;8:8"}},
{name:'PA5.VALUE_1',index:'PA5.VALUE_1',width:90,align:'center',sortable:false,edittype:'select',editoptions:{value:":All;:;M 10:M 10;M 12:M 12;M 14:M 14;M 16:M 16;M 18:M 18;M 20:M 20;M 22:M 22;M 24:M 24;M 27:M 27;M 3:M 3;M 30:M 30;M 36:M 36;M 4:M 4;M 48:M 48;M 5:M 5;M 6:M 6;M 8:M 8"}},
{name:'PA6.VALUE_1',index:'PA6.VALUE_1',width:90,align:'center',sortable:false,edittype:'select',editoptions:{value:":All;:;10:10;13:13;16:16;18:18;21:21;24:24;27:27;30:30;36:36;40:40;45:45;5.5:5.5;54:54;7:7;72:72;8.5:8.5"}},
{name:'PRICE',index:'PRICE',width:70, align:'center',formatter:'currency',sortable:false,search:false},
{name:'art_nr',index:'art_nr',width:25, align:'left',sortable:false,search:false}
],
pager: ‘#pager’,
height: ‘auto’,
width: 825,
shrinkToFit: false,
forceToFit: false,
imgpath: ‘/shop/javascript/jquery/themes/basic/images’,
loadError: function(xhr,st,err) {alert(’Type: ‘+st+’; Response: ‘+ xhr.status + ‘ ‘+xhr.statusText);},
loadonce: false,
loadui: “blockâ€,
rowNum: 20,
rowList: [20,30,40,50,100],
sortname: ‘PRODUCT_NUMBER’,
sortorder: “ascâ€,
viewrecords: true,
toolbar: [true,"top"],
//The JSON reader. This defines what the JSON data returned from the CFC should look like
jsonReader: {
root: “ROWSâ€, //our data
page: “PAGEâ€, //current page
total: “TOTALâ€, //total pages
records:â€RECORDSâ€, //total records
userdata:â€USERDATAâ€, //Userdata we will pass back for feedback
cell: “â€, //Not Used
id: “0″ //Will default to frist column
},
caption: ‘Liste der Dimensionen’,
afterInsertRow: function(rowid, aData){
jQuery(â€#listâ€).setCell( rowid, ‘PRODUCT_NUMBER’,â€, { “font-weightâ€: “boldâ€});
jQuery(â€#listâ€).setCell( rowid, ‘PRICE’,â€, { “font-weightâ€: “boldâ€});
},
onCellSelect: function( rowid, iCol, aData) {
var mynumberofcolumns = $(â€#listâ€).getGridParam(â€colModelâ€).length-1;
id = $(â€#listâ€).getCell(rowid, 0);
dim_nr = $(â€#listâ€).getCell(rowid, 1);
// alert(â€iCol=â€+iCol + †mynumberofcolumns=â€+mynumberofcolumns);
if (iCol == mynumberofcolumns) {
// oURL = “addbasket.cfm?CFID=2706&CFTOKEN=27757645&ID_O_PRODUCT=†+ id + “&parent_id=†+ parent_id;
// awin = widthndow.open(oURL,â€mainâ€);
alert(â€Produkt in den Warenkorb: †+ dim_nr );
} else {
alert(â€Click: Row: †+ rowid + †Cell: †+ iCol + †was clickedâ€);
}
},
ondblClickRow: function( rowid ){
id = $(â€#listâ€).getCell(rowid, 0);
dim_nr = $(â€#listâ€).getCell(rowid,1);
alert(â€doubleClick: rowid=†+ rowid + †id=â€+id+†dim_nr=â€+dim_nr);
},
onRightClickRow: function( rowid ) {
id = $(â€#listâ€).getCell(rowid, 0);
dim_nr = $(â€#listâ€).getCell(rowid,1);
//$(â€#myModalâ€).jqmShow();
alert( “leftClick: here we are: id=†+ id + †, dim_nr=†+ dim_nr);
}
});
jQuery(â€#t_listâ€).height(25).hide().filterGrid(â€listâ€,{gridModel:true,gridToolbar:true});
if (jQuery(â€#listâ€).getGridParam(’records’) > 20) {
jQuery(â€#t_listâ€).height(25).show().filterGrid(â€listâ€,{gridModel:true,gridToolbar:true});
}
jQuery(â€#listâ€).navGrid(’#pager’,{edit:false,add:false,del:false,search:false,refresh:false})
.navButtonAdd(â€#pagerâ€,{caption:â€Searchâ€,title:â€Toggle Searchâ€,buttonimg: ‘javascript/jquery/themes/basic/images/find.gif’,
onClickButton:function(){
if(jQuery(â€#t_listâ€).css(â€displayâ€)==â€noneâ€) {
jQuery(â€#t_listâ€).css(â€displayâ€,â€");
} else {
jQuery(â€#t_listâ€).css(â€displayâ€,â€noneâ€);
}
}
});
});
Ideas? TIA
12:51

Moderators
30/10/2007

Hello,
As I see you first column is hidden and since the iCol parameter correspond to cellIndex property, there is a bug in IE6/7 browsers getting the right cellIndex when some columns is hidden.
For more information see
http://support.microsoft.com/kb/814506
Also the bug is corrected in 3.5 beta
Regards
Tony
Edit: The bug is present in IE7 instead that from Microsoft tell
that this is for IE6
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.
Most Users Ever Online: 715
Currently Online:
202 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66