Solved

jqgrid GridToFrom

Posted on 2011-03-02
2
1,883 Views
Last Modified: 2012-05-11
Can someone provide an example on how to use jqGrid GridToForm and FormToGrid?
0
Comment
Question by:ikeyser
2 Comments
 
LVL 14

Accepted Solution

by:
R-Byter earned 500 total points
ID: 35025983
This is a page with very detailed instructions on how to do that.

http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing#gridtoform
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing#formtogrid

In your case:

jQuery("#grid_id").GridToForm( rowid, formid );

Open in new window


grid_id: the id of the parent grid
rowid: the id of the row
formid: is the jQuery object of form id, you can use formid[0].id to get form id.


jQuery("#grid_id").FormToGrid( rowid, formid, mode, position );

Open in new window


grid_id: the id of the parent grid
rowid: the id of the row
formid: is the jQuery object of form id, you can use formid[0].id to get form id.
mode: determines the mode. Can be set or add. Default is set. If the mode is defined as set, the record in the grid is updated with the new values from the form. When the mode is defined as add the record is added to the grid.
position: this parameter have sense only when the mode parameter is set to add. Can be first - the record is inserted as first row in the grid or last - the record is inserted as last row in the grid.

If you have any specific problems, please post your current code so I can be able to help you.

Regards
0
 

Author Closing Comment

by:ikeyser
ID: 35153310
Detailed example would have been more helpful but this is a good starting point.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Show confirmation alert in Jquery 14 42
How can I run the php script or the page without visiting the page? 6 52
Animated .jpg? 13 59
Message not shown 5 31
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now