PDA

View Full Version : how to add to grid two record in one action



westvovik
9 Mar 2011, 2:07 AM
i have a grid with store

After pressing the button the server adds 2 lines in base and returns a data in a kind

{"success":true, "message":null, "data": [{rec1}, {rec2}]}

But I receive an error

Ext.data.DataReader: #realize was called with invalid remote-data. Please see the docs for DataReader#realize and review your DataReader configuration.

walldorff
11 Mar 2011, 8:02 PM
{rec1} and {rec2} are invalid objects.
Your data should be something like [{"firstname": "Adam", "lastname":"Adamson"},{"firstname": ...,...}].

It would help if you supply your code here (between CODE tags), and the full server response.