extjs4 - EXTjs 4.2.1 Display default data while loading grid data -


I am using EXTjs 4.2 and I would like to know if there is a way, using a loadmask or other mechanism Display the default value in the grid lines, while scroll up / down action is done and the grid needs to be loaded instead of displaying grid's blank block or loading message.

For example, after scrolling down, something will appear:

  | Column1 Details | -------------------------------------------- | Price 1 | Price 2 | | Value 3 Value 4 | Value 5 Value 6 | Loading data ... | Loading data ... | | Loading data ... | Loading data ... | | Loading data ... | Loading data ... |  

Then, when the information is full, it will show the value received, as is normal:

  | Column1 Details | -------------------------------------------- | Price 1 | Price 2 | | Value 3 Value 4 | Value 5 Value 6 | Value 7 Value 8. | Value 9 Value 10 | Value 11 Value 12 |  

I have manually inserted all of these rows with "data loading" ... information and replaced it that I get a response, but It requires specific use of codes to manage requests and stores and that is the reason why I am looking for a solution provided by the EXTjs library, if present. Thank you.

Depending on your information, it seems that you are loading each record at a time And then instead of loading all the store records, you get the values ​​you get.

What you have explained is true, only when you get the answer, which record are you going to update? If this is the case, you send the record in the callback to the success of the AJAX request and its use

for example

var newAddedRecord = mystore.add ({column: 'loading Data ... ', details:' Loading data ... '});

  Ext.Ajax.request ({url: 'URL to post', method: 'post', scope: this, success: work (request, option) {success, callback ( Request, option, this, newly added record);} Failure: handle failer, parameter: any parameter to be passed in parameters / requests}); Callback function in success  
  Success callback: function (request, option, scope, newly added record) {var jsonData = Ext.JSON.decode (request .responseText); // or the way your data has been returned to the new Aad record record ('column', JasonAdata column); NewAddedRecord.set ('Description', jsonData.description); NewAddedRecord.commit (); }  

Comments