Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






Force added row in inline edit to appear before current row

UserPost

11:42
15/12/2011


kobruleht

Member

posts 144

Post edited 11:44 – 15/12/2011 by kobruleht


jqGrid 4.3 allows to add new row using inline edit.

Inline navigator demo in http://trirand.com/blog/jqgrid…..qgrid.html
Shows that after add command grid is scrolled to top and added row appears in top of grid.
This is confusing.

How to force added row to appear before current row?


Thi sis posted also in


http://stackoverflow.com/quest…..le-of-grid

12:31
15/12/2011


OlegK

Germany

Member

posts 1157

Hello,

I answerd to your question just now on the stackoverflow.

@Tony: I find the suggestion good and in the answer, which is oriented on form editing, I already suggested to extend the functionalite of the addRowData to support new 'afterSelected' and 'beforeSelected' values (additionally to existing 'first', 'last', 'after' and 'before') of the position parameter.

I suggest to extend the functionality of addRowData to support the new 'afterSelected' and 'beforeSelected' values of the position parameter.

Best regards
Oleg 

12:37
15/12/2011


tony

Sofia, Bulgaria

Moderator

posts 7010

Post edited 12:41 – 15/12/2011 by tony
Post edited 12:42 – 15/12/2011 by tony


This post is not here – my bad.


12:41
15/12/2011


tony

Sofia, Bulgaria

Moderator

posts 7010

Post edited 12:41 – 15/12/2011 by tony


And for the other questions in stackoverflow please read here – the position can be determined with parameter.

http://www.trirand.com/jqgridw…..ing#addrow


I kindly suggest to read the docs, instead that sometime I do not have time to update it


Kind Regards


12:55
15/12/2011


OlegK

Germany

Member

posts 1157

Hello Tony,

I know that

Inside of both addRow

$($t).jqGrid('addRowData', p.rowID, p.initdata, p.position);

(see here) and editGridRow

$($t).jqGrid("addRowData",ret[2],postdata,p.addedrow);

(see here) call addRowData with tree parameter, so it is impossible to use 'after' and 'before' as the value of position parameter.

Moreover adding the row before or after the last selected row can be interesting independent of the addRow and editGridRow methods. So I think that intruduction of new values 'afterSelected' and 'beforeSelected' of the position parameter cen be helpful.

Best regards
Oleg 


22:37
15/01/2012


OlegK

Germany

Member

posts 1157

Hello Tony,

the implementation of the suggested feature is very easy. One can ovewrite the code of like I suggested in the answers here and here, but the best will be if one modifies some lines of the original addRowData method to include support new 'beforeSelected' and 'afterSelected' value of the position parameter.

I think that the feature will be very practical for many users especially after introducing of inlineNav method.

Best regards
Oleg 


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

19 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9596

Posts: 28792

Membership:

There are 10197 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7010 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information