Jun 09, 2011, 5:48 PM
[CLOSED] When updating a grid via a store update proxy is it possible to return additional script to run?
Hi,
I have been looking at this example here:
https://examples1.ext.net/#/GridPane.../HandlerUsing/
I like how you can do this:
However, in our scenarios, sometimes editing one column can change the values of other columns (through complex business logic).
Our ashx update implementation calls some custom business logic components where we have the ability to get those updated rows from our storage system automatically as a return value of the update call.
I can easily convert those updated records into a format that the Store object works with so it would be nice to somehow just return them in that same ashx request, but I can't see how/if that is possible?
If it is not, is the only option to make a second ajax request to refresh the store? So, where you have this:
I have been looking at this example here:
https://examples1.ext.net/#/GridPane.../HandlerUsing/
I like how you can do this:
<UpdateProxy>
<ext:HttpWriteProxy Method="POST" Url="../../Shared/SuppliersSave.ashx" />
</UpdateProxy>
That seems almost exactly what we need, as many of our grids are generated on demand so we can't send updates of our grid to code behind/post back.However, in our scenarios, sometimes editing one column can change the values of other columns (through complex business logic).
Our ashx update implementation calls some custom business logic components where we have the ability to get those updated rows from our storage system automatically as a return value of the update call.
I can easily convert those updated records into a format that the Store object works with so it would be nice to somehow just return them in that same ashx request, but I can't see how/if that is possible?
If it is not, is the only option to make a second ajax request to refresh the store? So, where you have this:
<ext:Button runat="server" Text="Save" Icon="Disk">
<Listeners>
<Click Handler="#{GridPanel1}.save();" />
</Listeners>
</ext:Button>
Would I have to do something just after save, such as this:<ext:Button runat="server" Text="Save" Icon="Disk">
<Listeners>
<Click Handler="#{GridPanel1}.save(); #{GridPanel1}.reload();" />
</Listeners>
</ext:Button>
If the save() is asynchronous, then would reload execute too quickly and if so, do I just hook into the store's onSave event (or whatever it is called) and do a reload then?
Last edited by Daniil; Jun 10, 2011 at 6:45 PM.
Reason: [CLOSED]