1

I'm using a JQGrid with cellsubmit: 'clientArray' and executing addRowData and delRowData from custom buttons in a column.

I want to send modified data to server through a 'Send Button' and I know that I can getChangedCells to get edited cells but I don't know how to get added and removed rows.

How can I achieve this?

Thanks :-)

rubdottocom
  • 8,110
  • 10
  • 39
  • 59

1 Answers1

1

I suppose you will have to send whole jqGrid data to the server and the server have to compare the data with the data saved on the server (in the database).

If you communicate with the server using XML data, the answer jqGrid Problem Generating XML can help you. If you use JSON to the data transfer, look at the another answer: jqGrid howto send all rowData in json format to server?.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Oh! is almost what I need, but I'm using grids as subgrid and if a subgrid is not visible I can't get data. Can I get data from not visible grids or rows? – rubdottocom Oct 19 '10 at 15:42
  • I think that I can get grid/subgrid data when expand and/or when grid is modified. Do you think is a good approach? Thanks :-) – rubdottocom Oct 19 '10 at 15:51
  • @rubdottocom: Do you have a simple example which can be used to reproduce your subgrid? In general you can implement different scenarios with subgrid. It can be that no local data at all will be hold locally for subgrids. Only if you expand subgrid, the data will be read from the server. So your example can clear a lot of things. – Oleg Oct 19 '10 at 15:57
  • Hi Oleg, currently I'm doing a dummy app and code is a bit... dirty, I think that I can solve my problem with your answer. Thanks a lot. – rubdottocom Oct 19 '10 at 16:13
  • @rubdottocom: You welcome! If you do will have problems, just post the new question and better with the small example which reproduce your problem. Instead of server code you can post the JSON responses. One can save the responses in text tiles and use the files instead of dynamical server responses. Sometime during creating a test example you can solve the problem yourself. – Oleg Oct 19 '10 at 16:31