使用jqGrid生成发票
我想使用 jqGrid 在 php 中生成
我需要的发票系统,我填写发票项目的文本框并按添加,项目应该添加到 jqGrid 中。
如果我需要,我可以从网格中删除任何项目。
最后我将这些数据保存到 mysql 中。
谢谢
i want to use jqGrid to generate invoice system in php
what i need, i fill the text boxes for invoice items and press add, item should be added in jqGrid.
and if i need i can be able to remove any item from grid.
and at the end i save that data to mysql.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你将你的问题表述为一般性的。首先,jqGrid支持本地数据编辑,或者它可以执行ajax请求,让您将修改后的数据(还有新行或应删除的鱼子的id)发布到服务器。 jqGrid还可以填写表格来为您添加数据。
我建议您首先查看 官方 jqGrid 演示 并在树上选择项目“行编辑”/“输入类型”查看内联编辑的可能性 并在同一演示中选择“实时数据操作”/“导航器”项目以了解如何使用 表单编辑。用户完成行编辑并按“Enter”后(如果是 内联编辑)或“提交”按钮(如果是 表单编辑)有关添加/更改/删除的行的信息将发布到jqGrid的
editurl
参数定义的URL中。与行数据一起,作为附加参数,将被发布为“add”、“edit”或“del”字符串的操作,以及在添加新行的情况下可以为“_empty”的id。如果添加新行,您的服务器代码必须返回新添加行的 id。使用 Fiddler 或 Firebug 查看行编辑期间将发送到服务器并从服务器返回的内容。You formulate your question to general. First of all jqGrid support local data editing or it can do ajax requests for your to post the modified data (also the new row or the id of the roe which should be deleted) to the server. jqGrid can also fill the forms to add the data for you.
I recommend you before all to look at the official jqGrid demo and choose on the tree the items "Row Editing" / "Input types" to see the possibilities of the inline editing and choose on the same demo the items "Live Data Manipulation" / "Navigator" to see how to use form editing. After the user finish the row editing and press "Enter" (in case of the inline editing) or "Submit" button (in case of the form editing) the information about the row added/changed/deleted will be posted to the URL defined by the
editurl
parameter of the jqGrid. Together with the row data, as the additional parameter, will be posted oper which will be "add", "edit" or "del" string and the id which can be "_empty" in case of adding a new row. In case of adding of the new row your server code have to return the id of the new added row. It is very helpful to use Fiddler or Firebug to see what will be send to and returned from the server during the row editing.