Solved

jqgrid GridToFrom

Posted on 2011-03-02
2
1,912 Views
Last Modified: 2012-05-11
Can someone provide an example on how to use jqGrid GridToForm and FormToGrid?
0
Comment
Question by:ikeyser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…

737 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