Solved

jqgrid GridToFrom

Posted on 2011-03-02
2
1,900 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lazy load not working with masonry js 1 22
How to resize a div in html 3 38
Google Analytics setup 5 50
Load data upon clicking a button 8 35
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

828 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