Store Save on New Row Not working?

  1. #1

    Store Save on New Row Not working?

    I have a grid - when I make an edit/change and hit save - works fine. When I hit add new row - enter data and hit save - the save mask comes up but the insert event is never kicked off?

    The save mask just sits onscreen and spins...
  2. #2

    RE: Store Save on New Row Not working?

    I am calling the below function on a textfield change listener - no matter what I do - the store is not getting marked as dirty?

    
    
    
    function setProcedureCodeInfo(code, description, price, mnemonic) {
    
    
    //alert(code + "\r\n" + description + "\r\n" + price + "\r\n" + mnemonic);
    
    
    storeCharge.data.items[intRowIndex].data["CPT_HCPCS_Code"] = code;
    
    
    var rec = gridCharge.getStore().getAt(intRowIndex); // Get the Record
    
    
    rec.set("CPT_HCPCS_Code", code);
    
    
    rec.commit();
    
    
    rec.data["CPT_HCPCS_Code"] = code; // updates record, but not the view
    
    
    rec.commit(); // updates the view
    
    
    
    
    
    storeCharge.data.items[intRowIndex].data["Description"] = "CDM: </br>Ovrd: " + description + "</br>CPT: ";
    
    
    var rec = gridCharge.getStore().getAt(intRowIndex); // Get the Record
    
    
    rec.set("Description", "CDM: </br>Ovrd: " + description + "</br>CPT: ");
    
    
    rec.commit();
    
    
    rec.data["Description"] = "CDM: </br>Ovrd: " + description + "</br>CPT: "; // updates record, but not the view
    
    
    rec.commit(); // updates the view
    
    
    storeCharge.data.items[intRowIndex].data["Charge"] = price;
    
    
    var rec = gridCharge.getStore().getAt(intRowIndex); // Get the Record
    
    
    rec.set("Charge", price);
    
    
    rec.commit();
    
    
    rec.data["Charge"] = price; // updates record, but not the view
    
    
    rec.commit(); // updates the view
    
    
    storeCharge.data.items[intRowIndex].data["Mnemonic"] = mnemonic;
    
    
    var rec = gridCharge.getStore().getAt(intRowIndex); // Get the Record
    
    
    rec.set("Mnemonic", mnemonic);
    
    
    rec.commit();
    
    
    rec.data["Mnemonic"] = mnemonic; // updates record, but not the view
    
    
    rec.commit(); // updates the view
    
    
    rec.dirty = true;
    
    
    //storeCharge
    
    
    storeCharge.dirty = true;
    
    
    alert(storeCharge.isDirty());
    
    
    
    
    
    }
  3. #3

    RE: Store Save on New Row Not working?

    I have this ajaxevent tied to my textfieeld in my grid - intially, when I enter the value - the field is marked as dirty - but when it comes back from the ajaxevent - it seems to commit the changes - so when I hit save, it does not see anything as dirty any more...?







    <AjaxEvents>


    <Change OnEvent="txtProcedureCode_Change"></Change>


    </AjaxEvents>
  4. #4

    RE: Store Save on New Row Not working?

    Any help on this?

Similar Threads

  1. How to save Store in a Array?
    By ascsolutions in forum 1.x Help
    Replies: 1
    Last Post: Jan 12, 2012, 6:35 AM
  2. Force save on store even when no change?
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Nov 24, 2010, 9:30 AM
  3. Save Back to Store from textfields, etc.?
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Apr 30, 2009, 2:43 PM
  4. [CLOSED] GridPanel.save isn't working correctly
    By iansriley in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 06, 2009, 7:52 AM
  5. Data back on a Store.save()
    By Dave.Sanders in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 03, 2008, 1:03 PM

Posting Permissions