[Ext 2.2] EditorGrid / JsonStore - load empty

January 5th, 2009
  • Hi,

    At some point I need to load grid empty.
    I am using JsonStore by defautl, but depending on some situation I would like to feed it with no data (0 records)... so that also emptyText in view config will show.

    I have no idea how to feed "no records" to jsonstore.

    Thanks!


  • I have tried this way, but it fails with: "M is undefined".


  • You just don't pass any records!

    Say your JSON usually looks like:


    data: [{rec1}, {rec2}]


    It should just be:

    data: //empty array


  • I have solved my problem.
    It turned out it was not realy store related but grid view related. I was not able to show emptyText initially when dialog window was created. Once dialog window was created it worked. I guess not all components in dialog window are properly ready on initial call and removeAll records didn't "lead to emptyText". I changed the way I call it and it is working now.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about [Ext 2.2] EditorGrid / JsonStore - load empty , Please add it free.