EXT.NET Crud Operation With Detail Window

  1. #1

    EXT.NET Crud Operation With Detail Window

    Hello,
    I have an interesting question. I am using desktop module. I have master screen for listing records and detail window for editing and adding records. I am using web services for everthing. No code has been placed in codebehind. I have checked this example: https://examples1.ext.net/#/GridPane.../ServiceUsing/
    But the problem with this example i don't have model detail screen. I just have rec = this.getRecord(); and this only works for updating.
    Is there any way adding and updating records from detail window just using web service and StoreDataHandler?
    Thanks.
  2. #2
    Hi @sskapci,

    Quote Originally Posted by sskapci View Post
    Is there any way adding and updating records from detail window just using web service and StoreDataHandler?
    Could you, please, clarify what stops you to do that?
  3. #3
    Thank you for replying @Daniil.
    As i mentioned before ı don't have data model in detail window. Also, I dont have a grid too.
    Orginal example is this:

     <ext:GridPanel
                    ID="GridPanel1" 
                    runat="server" 
                    Region="Center" 
                    Title="Suppliers"
                    Icon="Lorry" 
                    Frame="true">
                    <Store>
                        <ext:Store ID="Store1" runat="server">
                            <Proxy>
                                <ext:AjaxProxy Url="../../Shared/SuppliersService.asmx/GetAllSuppliers" >
                                    <ActionMethods Read="GET" />
                                    <API Sync="../../Shared/SuppliersService.asmx/SaveSuppliers" />
                                    <Reader>
                                        <ext:XmlReader Record="Supplier" IDProperty="SupplierID" SuccessProperty="Success" MessageProperty="Message" />
                                    </Reader>
                                    <Writer>
                                        <ext:JsonWriter Encode="true" Root="data" />
                                    </Writer>
                                </ext:AjaxProxy>
                            </Proxy>         
                            <SyncParameters>
                                <ext:StoreParameter Name="action" Value="operation.action" Mode="Raw" />
                            </SyncParameters>               
                            <Model>
                                <ext:Model runat="server" IDProperty="SupplierID">
                                    <Fields>
                                        <ext:ModelField Name="SupplierID" />
                                        <ext:ModelField Name="CompanyName" />
                                        <ext:ModelField Name="ContactName" />
                                        <ext:ModelField Name="ContactTitle" />
                                        <ext:ModelField Name="Address" />
                                        <ext:ModelField Name="City" />
                                        <ext:ModelField Name="Region" />
                                        <ext:ModelField Name="PostalCode" />
                                        <ext:ModelField Name="Country" />
                                        <ext:ModelField Name="Phone" />
                                        <ext:ModelField Name="Fax" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                            <Sorters>
                                <ext:DataSorter Property="CompanyName" Direction="ASC" />
                            </Sorters>
                            <Listeners>                            
                                <Write Handler="Ext.Msg.alert('Success', 'The suppliers have been saved');" />
                            </Listeners>                        
                        </ext:Store>
                    </Store>
    But in my case i am using like this(in a form panel):

    <ext:Button ID="prse_btnSave" runat="server" Text="Save" Icon="Disk">
                <DirectEvents>
                    <Click
                        Success="personsJS.save(result);"
                        Url="../Services/personOperations.asmx/save"
                        Type="Load"
                        Method="POST"
                        CleanRequest="true">
                        <ExtraParams>
                            <ext:Parameter Name="prse_personsID" Value="#{prse_txtPersonsID}.getValue()" Mode="Raw" />
                            <ext:Parameter Name="prse_name" Value="#{prse_txtName}.getValue()" Mode="Raw" />
                            <ext:Parameter Name="prse_middleName" Value="#{prse_txtMiddleName}.getValue()" Mode="Raw" />
                            <ext:Parameter Name="prse_surname" Value="#{prse_txtSurname}.getValue()" Mode="Raw" />
                            <ext:Parameter Name="prse_hasLogin" Value="#{prse_chbHasLogin}.getValue()" Mode="Raw" />
                            <ext:Parameter Name="prse_isEmployee" Value="#{prse_chbIsEmployee}.getValue()" Mode="Raw" />
                        </ExtraParams>
                    </Click>
                </DirectEvents>
            </ext:Button>
    I don't want to use directevents. I am looking for a solution now.
    Thanks for your time..
  4. #4
    From a child page you can access a parent page. I think you should update the Store's record and initiate a save request in a common way from the master page.

Similar Threads

  1. Master Detail with CRUD operation
    By shaileshsakaria in forum 2.x Help
    Replies: 0
    Last Post: Jan 08, 2013, 4:36 AM
  2. Replies: 8
    Last Post: Mar 13, 2012, 5:54 PM
  3. Replies: 0
    Last Post: Nov 30, 2011, 12:51 PM
  4. Detail Window Remote
    By BLOZZY in forum Examples and Extras
    Replies: 1
    Last Post: Aug 04, 2010, 6:02 PM
  5. open new window with detail records
    By moosa.ali in forum 1.x Help
    Replies: 1
    Last Post: Jul 15, 2010, 2:27 PM

Tags for this Thread

Posting Permissions