views:

19

answers:

2

Hi,

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 :-)

+1  A: 

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?.

Oleg
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
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
@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
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
@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
A: 

I keep seeing this answer regarding get all data stored in clientArray using getRowData(), but this only applies if the grid has only one page. Is there any way (and how), in which to get all data stored in grid, even if the grid has more than one page?

ihazcooki3z