0

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

air
  • 6,136
  • 26
  • 93
  • 125

1 Answers1

2

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.

Oleg
  • 220,925
  • 34
  • 403
  • 798