Feb 10, 2010, 6:32 AM
[CLOSED] GridPanel Server-Side Save.
Hi
I've seen the good explanation about GridPanel that Vladmir posted. Thanks for this.
I have also seen this post with no answer, asking if there is an alternative for this.
Other posts talks about Multiple Grid Saving where I got impression some big changes will be done in the future.
What I'd like to know is if there are plans to support this in the future if not already supported on version 1.0?
The main issue with this is when using AjaxEvents and save two portions of data (part on Grid and part on FormPanel) in one go. To better explain what I am saying, please see below code (which I have accomplished what I needed):
Actually I have another FormPanel within a UserControl, but it is not relevant for this explanation.
The user click the button Save and I AjaxEvent is performed. My issue is that I could not find a way to save the grid data in this roundtrip. The save is only taken place on Success event as you can see.
As I said, this is working as it is for this example, but now I need to save the data of the grid as a part of the main FormPanel data. That means, I now need to work in a different example in which I need to Save a sort of Complex business object (a collection as a part of the main object). So it will be very important to save the data in one roundtrip.
For instance, let's say I have a Mother object. Mother's first name, surname, etc, is on FormPanel.
The Mother can have Children and this collection of Children is on Grid. My BusinesObject is prepared to save Mother & Mother.Children in one go.
Can you understand my problem?
Can you help me to find a solution for this scenario?
Will GridPanel support Server-Side save method in the future?
Your help is much appreciated.
Leo
I've seen the good explanation about GridPanel that Vladmir posted. Thanks for this.
I have also seen this post with no answer, asking if there is an alternative for this.
Other posts talks about Multiple Grid Saving where I got impression some big changes will be done in the future.
What I'd like to know is if there are plans to support this in the future if not already supported on version 1.0?
The main issue with this is when using AjaxEvents and save two portions of data (part on Grid and part on FormPanel) in one go. To better explain what I am saying, please see below code (which I have accomplished what I needed):
<ext:Button ID="ButtonSave" runat="server" Icon="Disk" Text="Save">
<AjaxEvents>
<Click OnEvent="SaveClick" Success="if (#{GridPanelContactTypeDetails}){#{GridPanelContactTypeDetails}.save();}refreshTree();"
Before="return (checkValid(#{FormPanelDetails}) && checkDirty(#{FormPanelAddress}));">
</Click>
</AjaxEvents>
</ext:Button>
So for this example, there are two ways of input data: FormPanelDetails and GridPanelContactTypeDetails with editor.Actually I have another FormPanel within a UserControl, but it is not relevant for this explanation.
The user click the button Save and I AjaxEvent is performed. My issue is that I could not find a way to save the grid data in this roundtrip. The save is only taken place on Success event as you can see.
As I said, this is working as it is for this example, but now I need to save the data of the grid as a part of the main FormPanel data. That means, I now need to work in a different example in which I need to Save a sort of Complex business object (a collection as a part of the main object). So it will be very important to save the data in one roundtrip.
For instance, let's say I have a Mother object. Mother's first name, surname, etc, is on FormPanel.
The Mother can have Children and this collection of Children is on Grid. My BusinesObject is prepared to save Mother & Mother.Children in one go.
Can you understand my problem?
Can you help me to find a solution for this scenario?
Will GridPanel support Server-Side save method in the future?
Your help is much appreciated.
Leo