Forum
09:41
14/12/2013
hi
i am adding blank rows and then updating those rows. while updating these newly crated the rows all the created rows are updationg. can any one help me on this.
$(
$(
url:
colNames: [
colModel: [{ name:
{ name:
{ name:
dataEvents: [
{
type:
fn:
function () {"#editgrid").jqGrid({'WebForm5.aspx?q=1', datatype: "json", mtype: "POST",'Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Closed', 'Ship via', 'Notes'],'id', index: 'id', width: 55, editable: false, editoptions: { readonly: true, size: 10} },'invdate', index: 'invdate', width: 80, editable: true, editoptions: { size: 10} },'name', index: 'name', width: 90, editable: true, edittype: "text", editoptions: { size: '25','keypress',function (e) {// alert($(this).val());
jQuery(
$(
'#editgrid').enableTextSelect();this).bind("selectstart", function () { return true; })var key = e.charCode || e.keyCode;if ((key < 48 || key > 57) && // if non digit
key !== 46 && key !== 44 && key !== 8 &&
// and not . or , or backspace
key !== 37 && key !== 39) {
// arrow left and arrow right
}
}
}
]
 
}
 
 
 
},
return false;// {name: 'name', index: 'name', width: 100, editable: true, edittype: 'custom', editoptions: { custom_element: my_input, custom_value: my_value} },
{name:
{ name:
{ name:
{ name:
{ name:
{ name:
rowNum: 10, rowList: [10, 20, 30],
jsonReader: {
page:
total:
records:
root:
repeatitems:
'amount', index: 'amount', width: 60, align: "right", editable: true, editoptions: { size: 10} },'tax', index: 'tax', width: 60, align: "right", editable: true, editoptions: { size: 10} },'total', index: 'total', width: 60, align: "right", editable: true, editoptions: { size: 10} },'closed', index: 'closed', width: 55, align: 'center', editable: true, edittype: "checkbox", editoptions: { value: "true:false"} },'ship_via', index: 'ship_via', width: 70, editable: true, edittype: "select", editoptions: { value: "FE:FedEx;TN:TNT"} },'note', index: 'note', width: 100, sortable: false, editable: true, edittype: "textarea", editoptions: { rows: "2", cols: "20"}}],"page","total","records","rows",false
},
//scrollrows : true,
onSelectRow:
function (id) {// jQuery('#editgrid').disableTextSelect();
jQuery(
jQuery(
lastsel2 = id;
}
},
afterInsertRow:
if (id && id !== lastsel2) {'#editgrid').jqGrid('restoreRow', lastsel2);'#editgrid').jqGrid('editRow', id, true);function (rowid, iCol, cellcontent) {var isMouseDown = false, isHighlighted = false;var colindex = 0;//alert(iCol.toString());
$(
.mousedown(
isMouseDown =
colindex = $(
textdata = $(
isHighlighted =
jQuery(
 
$(
var textdata;"#editgrid td")function () {true;this).index();this).text();true;'#editgrid').disableTextSelect();this).toggleClass("highlighted", isHighlighted);//jQuery('#editgrid').jqGrid('restoreRow', rowid);
//jQuery('#editgrid').setColProp('name', { editable: false });
return false; // prevent text selection
}).mouseover(
jQuery(
$(
$(
}
function () {if (isMouseDown) {'#editgrid').jqGrid("editCell", rowid, colindex, false);if (colindex == $(this).index()) {this).toggleClass("highlighted", isHighlighted);if (textdata != "")this).text(textdata);//$(this).text("added");
}
})
// .bind("selectstart", function () {
//// if (isHighlighted)
//// return false;
//// else
// return true;
// })
$(document)
.mouseup(
isMouseDown =
isHighlighted =
$(
jQuery(
})
$(
},
pager:
sortname:
viewrecords:
sortorder:
caption:
hidegrid:
loadonce:
cellEdit:
multiselect:
cellsubmit:
afterEditCell:
},
afterSaveCell:
jQuery(
}
jQuery(
}
},
editurl:
function () {false;false;".highlighted").toggleClass("highlighted", isHighlighted);'#editgrid').enableTextSelect();"#editgrid td").unbind("selectstart", function () { return true; })'#pagered','id',true,"desc","Search Example",false,true,true,true, height: 400,'clientArray',function (id, name, val, iRow, iCol) {if (name == 'invdate') { jQuery("#" + iRow + "_invdate", "#celltbl").datepicker({ dateFormat: "yy-mm-dd" }); }function (rowid, name, val, iRow, iCol) {if (name == 'Name') {var Name = jQuery("#editgrid").jqGrid('getCell', rowid, iCol + 1);"#editgrid").jqGrid('setRowData', rowid, Name);if (name == 'amount') {var Gender = jQuery("#editgrid").jqGrid('getCell', rowid, iCol - 1);"#editgrid").jqGrid('setRowData', rowid, Gender);"WebForm5.aspx/UpdatePerson"
});
jQuery(
edit:
})
jQuery(
jQuery(
 
 
});
"#editgrid").navGrid('#pagered', {true, add: true, del: true, search: true, editheight: 800"#editgrid").jqGrid('navGrid', '#pkeynav', { edit: false, add: false, del: false });"#editgrid").jqGrid('gridResize', { minWidth: 350, maxWidth: 800, minHeight: 80, maxHeight: 350 });
Most Users Ever Online: 715
Currently Online:
57 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