Solved

jqgrid GridToFrom

Posted on 2011-03-02
2
1,868 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
Comment Utility
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
Comment Utility
Detailed example would have been more helpful but this is a good starting point.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…

772 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

9 Experts available now in Live!

Get 1:1 Help Now