Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
v3.5 - Inline Editing: onSelectRow & row id bug?
14/07/2009
12:17
Avatar
samuel
Member
Members
Forum Posts: 13
Member Since:
07/07/2009
sp_UserOfflineSmall Offline

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.

14/07/2009
12:24
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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/07/2009
14:28
Avatar
samuel
Member
Members
Forum Posts: 13
Member Since:
07/07/2009
sp_UserOfflineSmall Offline

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.

16/07/2009
00:51
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

16/07/2009
07:02
Avatar
samuel
Member
Members
Forum Posts: 13
Member Since:
07/07/2009
sp_UserOfflineSmall Offline

Hi Tony,

thanks this works as required now. Sorry if my description confused you, the problem became apparent to me on selecting a row which is why my post referred to onSelectRow().

Thanks for your help.

Sam.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information