• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1985
  • Last Modified:

jqgrid GridToFrom

Can someone provide an example on how to use jqGrid GridToForm and FormToGrid?
0
ikeyser
Asked:
ikeyser
1 Solution
 
R-ByterCommented:
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
 
ikeyserAuthor Commented:
Detailed example would have been more helpful but this is a good starting point.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now