Forum


14:05

05/02/2011

Hello,
my Grid is loaded but the gridComplete event is never fired.
What im doing wrong ?
Heres the code
jQuery(
datatype: getProducts,
colNames: [
colModel: [{ name:
{ name:
{ name:
{ name:
{ name:
{ name:
{ name:
{ name:
{ name:
{ name:
{ name:
{ name:
],
onSelectRow:
alert(
jQuery(
lastSel = ProductID;
}
jQuery(
jQuery(
}
}
jQuery(
lastSel = ID;
}
}
},
ajaxEditOptions: { contentType:
recreateForm:
serializeEditData:
},
editurl:
caption:
rowNum: 500,
rowList: [5, 10, 20, 50, 100],
sortname:
pager: jQuery(
sortorder:
viewrecords:
gridComplete:
alert(
},
loadComplete:
alert(
}
});
jQuery(
"#productGridView").jqGrid({'ID', 'MakeId', 'Category', 'Segment', 'SubSegment', 'FLNr', 'ModName', 'MakeId1', 'Category1', 'Segment1', 'SubSegment1', 'FLNr1'],'ID', index: 'ID', width: 30, align: 'left' },'MakeId', index: 'MakeId', width: 30, align: 'left', editable: true, edittype: 'text' },'Category', index: 'Category', width: 50, align: 'left', editable: true, edittype: 'text' },'Segment', index: 'Segment', width: 50, align: 'left', editable: true, edittype: 'text' },'SubSegment', index: 'SubSegment', width: 50, align: 'left', editable: true, edittype: 'text' },'FLNr', index: 'FLNr', width: 50, align: 'left', editable: true, edittype: 'text' },'ModName', index: 'ModName', width: 80, align: 'left', editable: true, edittype: 'text' },'MakeId1', index: 'MakeId1', width: 50, align: 'left', editable: true, edittype: 'text' },'Category1', index: 'MakeId1', width: 50, align: 'left', editable: true, edittype: 'text' },'Segment1', index: 'MakeId1', width: 50, align: 'left', editable: true, edittype: 'text' },'SubSegment1', index: 'MakeId1', width: 50, align: 'left', editable: true, edittype: 'text' },'FLNr1', index: 'MakeId1', width: 50, align: 'left', editable: true, edittype: 'text' },function (ProductID) {if (ProductID && ProductID !== lastSel) {if (lastSel != null) {var bestaetigung = window.confirm('not saved! save ?');if (bestaetigung) {"wird gespeichert");'#productGridView').saveRow((ID, true));else {'#productGridView').editRow(ID, true);'#productGridView').restoreRow(lastSel);else {'#productGridView').editRow(ProductID, true);"application/json" },true,function (postData) {return JSON.stringify(postData);"DataLoader.svc/EditProducts","Input Types",'ProductID','#pageNavigation'),"desc",true,function () {'komplett');function () {'Error');"#productGridView").jqGrid('setGridHeight', 400);
jQuery(
"#productGridView").jqGrid({
datatype: getProducts,
colNames: [
'ID', 'MakeId', 'Category', 'Segment', 'SubSegment', 'FLNr', 'ModName', 'MakeId1', 'Category1', 'Segment1', 'SubSegment1', 'FLNr1'],
colModel: [{ name:
'ID', index: 'ID', width: 30, align: 'left' },
{ name:
'MakeId', index: 'MakeId', width: 30, align: 'left', editable: true, edittype: 'text' },
{ name:
'Category', index: 'Category', width: 50, align: 'left', editable: true, edittype: 'text' },
{ name:
'Segment', index: 'Segment', width: 50, align: 'left', editable: true, edittype: 'text' },
{ name:
'SubSegment', index: 'SubSegment', width: 50, align: 'left', editable: true, edittype: 'text' },
{ name:
'FLNr', index: 'FLNr', width: 50, align: 'left', editable: true, edittype: 'text' },
{ name:
'ModName', index: 'ModName', width: 80, align: 'left', editable: true, edittype: 'text' },
{ name:
'MakeId1', index: 'MakeId1', width: 50, align: 'left', editable: true, edittype: 'text' },
{ name:
'Category1', index: 'MakeId1', width: 50, align: 'left', editable: true, edittype: 'text' },
{ name:
'Segment1', index: 'MakeId1', width: 50, align: 'left', editable: true, edittype: 'text' },
{ name:
'SubSegment1', index: 'MakeId1', width: 50, align: 'left', editable: true, edittype: 'text' },
{ name:
'FLNr1', index: 'MakeId1', width: 50, align: 'left', editable: true, edittype: 'text' },
],
onSelectRow:
function (ProductID) {
if (ProductID && ProductID !== lastSel) {
if (lastSel != null) {
var bestaetigung = window.confirm('not saved! save ?');
if (bestaetigung) {
alert(
"wird gespeichert");
jQuery(
'#productGridView').saveRow((ID, true));
lastSel = ProductID;
}
else {
jQuery(
'#productGridView').editRow(ID, true);
jQuery(
'#productGridView').restoreRow(lastSel);
}
}
else {
jQuery(
'#productGridView').editRow(ProductID, true);
lastSel = ID;
}
}
},
ajaxEditOptions: { contentType:
"application/json" },
recreateForm:
true,
serializeEditData:
function (postData) {
return JSON.stringify(postData);
},
editurl:
"DataLoader.svc/EditProducts",
caption:
"Input Types",
rowNum: 500,
rowList: [5, 10, 20, 50, 100],
sortname:
'ProductID',
pager: jQuery(
'#pageNavigation'),
sortorder:
"desc",
viewrecords:
true,
gridComplete:
function () {
alert(
'komplett');
},
loadComplete:
function () {
alert(
'Error');
}
});
jQuery(
"#productGridView").jqGrid('setGridHeight', 400);
20:27

Moderators
30/10/2007

Hello,
Sorry, but the code published is really difficult to be read.
Please place a link to the problem or to a code.
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.
Most Users Ever Online: 715
Currently Online:
64 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