1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    101
    Vote Rating
    0
    paulharv is on a distinguished road

      0  

    Default Initialize EditorGridPanel with blank rows

    Initialize EditorGridPanel with blank rows


    Hi,

    I need to populate a Grid with blank rows. I can do this, but because the store has autosave set to true and is restful, a PUT request gets fired for each blank row that I insert. This is not what I want - I want these blank rows to just live in the UI until someone actually enters something into them - only then do I want to send a PUT to the server.

    So I tried blocking the save of the blank rows in the store's beforesave event. That works. But when I enter data into one of the rows, instead of firing off a PUT for that one row, ExtJS fires off a PUT for all of the rows again.

    With a restful, autosaving store, is it possible to have these "UI only" rows - and produce a PUT request only for one that actually gets edited?

    Thanks

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,617
    Vote Rating
    396
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Have you tried store.suspectEvents(); add items; store.resumeEvents()

    Scott.

  3. #3
    Sencha User
    Join Date
    May 2010
    Posts
    101
    Vote Rating
    0
    paulharv is on a distinguished road

      0  

    Default


    Thanks
    I gave it a whirl, but it seems a little buggy.
    I did...

    Code:
    store.suspendEvents(false); //queueSuspended set ti false to prevent events from queing
    //... code to add records ...
    store.resumeEvents();
    ...but when I pass a false queueSuspended various things start breaking - like adding additional rows produces "Error: Ext.fly(this.getRow(row)) is null" errors. This does not happen when I pass true for queueSuspended, but then that's not the behavior I need....

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar