Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix addRow to add different id's if they are not set as parameter. Th…

…anks to Oleg
  • Loading branch information...
commit 86222736285b5a167a1af9c59b4c26ded713e377 1 parent dd452fa
@tonytomov authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/grid.inlinedit.js
View
5 js/grid.inlinedit.js
@@ -376,7 +376,7 @@ $.jgrid.extend({
},
addRow : function ( p ) {
p = $.extend(true, {
- rowID : "new_row",
+ rowID : null,
initdata : {},
position :"first",
useDefValues : true,
@@ -386,6 +386,7 @@ $.jgrid.extend({
return this.each(function(){
if (!this.grid ) { return; }
var $t = this;
+ p.rowID = $.isFunction(p.rowID) ? p.rowID.call($t, p) : ( (p.rowID !== null) ? p.rowID : $.jgrid.randId());
if(p.useDefValues === true) {
$($t.p.colModel).each(function(){
if( this.editoptions && this.editoptions.defaultValue ) {
@@ -419,7 +420,7 @@ $.jgrid.extend({
saveicon:"ui-icon-disk",
cancel: true,
cancelicon:"ui-icon-cancel",
- addParams : {useFormatter : false,rowID : "new_row"},
+ addParams : {},
editParams : {},
restoreAfterSelect : true
}, $.jgrid.nav, o ||{});
Please sign in to comment.
Something went wrong with that request. Please try again.