Forum
18:46
05/03/2012
Hi everybody,
I think I found this bug:
when using the jqGrid Option "idPrefix" to make sure there are unique tr - id's with multiple grids on the page and firing the 'addRow' method a new row is inserted in the grid but it doesn't enter edit mode, no input elements are created.
I assume the 'addRow' method uses the row-id "new_row" for selecting the inserted row, but the idPrefix is prefixed at the tr-id, as it should, so it is called 'prefixnew_row' and the addRow method doesn't find the new row for entering edit mode.
Could that be right?
Greetings
Snoopy
18:59
Moderators
30/10/2007
Hello,
A test case is highly apreciated.
I think you use a datatype local.
In this case it is highly recommendet to set a key:true option in the column which act as id.
Regards
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.
10:09
05/03/2012
Hi tony,
nope, I use datatype "json". I made a little test to validate the behaviour:
HTML:
<button type="button" id="btnAddA">+</button>
JavaScript:
…
$('#tblGridA').jqGrid({
datatype:'json',
url:'test1.php',
idPrefix:'PreA',
colNames:['Col1','Col2'],
colModel:[
{
name:'col1',
editable:true
},
{
name:'col2',
editable:true
}
]
});
$('#btnAddA')
.button()
.click(function() {
$('#tblGridA').jqGrid('addRow');
});
…
Server sider PHP ("test1.php"):
$return['rows'][$i]['id']=$i;
$return['rows'][$i]['cell']=array('A'.$i,'B'.$i);
}
echo json_encode($return);
Result after loading:
Result after click on Button:
Regards
snoopy
11:27
Moderators
30/10/2007
Hello,
Found the problem.Fixed in GitHub
Thank you.
Regards
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:
55 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