Forum
12:17
07/07/2009
When using inline editing In build 3.5, a row id column needs to be explicitly defined, to select a row using:
onSelectRow: function(id) *OR* ondblClickRow: function(id).
If no id column is defined, the functions above return 'undefined' when testing 'id'.
In version 3.4.4, if no id column is defined, the row id returned using onSelectRow & ondblClickRow is the row position in the grid, e.g. 4th row, id = 4.
As I present a blank grid which the user enters details into, the functionality from v3.4.4 is important to me. Could you confirm if this behaviour is no longer supported or if this is a bug in v3.5.
Thanks, Sam.
12:24
Moderators
30/10/2007
Hello,
It is difficult to me to understand what you mean.
onSelectRow does nothing to do with inline edit. It is just a way to call editing.
If yo do not pass a parameter to t onSelectRow you will not have this. I fo not understand waht you mean.
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.
14:28
07/07/2009
Hi Tony,
sorry if my description was not clear, i will try to give an example which you can test on v3.4.4 & v3.5 to show the problem.
Create a grid as shown in your demo page > row editing > input types.
In colModel: comment out first line defining column 'id'
//{name:'id',index:'id', width:90, sorttype:"int", editable: true},
In var mydata2: remove id:value pairs from each row:-
{id:"12345",name:"Desktop Computer",note:"note",stock:"Yes",ship:"FedEx"},
becomes:
{name:"Desktop Computer",note:"note",stock:"Yes",ship:"FedEx"},
Now when selecting a row:
onSelectRow: function(id){
alert(id);
// rest of code here...
}
Testing:
Using version 3.4.4, the grid will still work and 'id' has a value when you select a row, even though we have removed the column 'id'.
Using version 3.5 'id' is returned as undefined. the grid does not work in the same way as version 3.4.4.
I hope this explains a little better. My implementation expects the behaviour from 3.4.4. Please let me know if you have any questions.
thanks, Sam.
00:51
Moderators
30/10/2007
Hello Sam,
Sorry but your description is not correct. You point me to onSelectRow, but actually this is conected with addRowData. See the changes in GitHub and let me know if this work now
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:
88 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