hkalbertl / jquery.appendGrid

The dynamic table input JavaScript plugin
https://appendgrid.azurewebsites.net
MIT License
148 stars 76 forks source link

PHP - Load data from database #138

Closed mnfsbmz closed 3 years ago

mnfsbmz commented 3 years ago

Capture Capture2 Capture3 Capture4

Help please. How can load data using myAppendGrid.load();

hkalbertl commented 3 years ago

Hi mnfsbmz,

I assumed that your PHP code able get data and return them in JSON format. In your success ajax callback, make sure that:

  1. myAppendGrid is initialized
  2. result is an array of object, see the example of load method

If you still have problems, you may try to use ajax done style instead of success.

$.ajax({
  url: ...
}).done(function(result){
  myAppendGrid.load(result);
});