我想在表單中使用jqGrid,其中用戶填寫了諸如用戶名,電話等傳統表單域。表單包含用於行項目的jqGrid,用戶可以在其中添加/編輯/刪除行,並且完成後,提交整個表單。我有網格工作,因爲我希望它出現,我只是無法獲得作爲包含窗體的一部分提交的網格內容。如何提交jqgrid值作爲formfields?
下面是一個僞代碼示例:
<form id="foo">
<input id="username" type="text">Your name<br>
Enter your choices in the grid below:
<!-- imagine jqGrid here -->
<input type="submit" value="Submit the form"></form>
我已經搜索,Google搜索,閱讀文檔,閱讀維基等,但只是不明白怎麼傳jqGrid的行和列formfields 。任何指導將不勝感激。
謝謝!我得到這個與http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3Amethods&s%5B%5D=getrowdata底部附近的代碼示例一起工作,該代碼示例將值獲取到單個數組中,然後我可以用json2.js序列化。 – 2010-07-28 21:46:10
不客氣,很高興幫助! – 2010-07-29 01:01:29