This is a migrated thread and some comments may be shown as answers.

Grid Popup Edititing

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sergio
Top achievements
Rank 1
Sergio asked on 17 Oct 2012, 12:26 PM
Implementing the Popup editing in this way:
          $("#gridAddresses").kendoGrid({
             dataSource: {
                 type: "json",
                 transport: {
                     read:  {url:'api/AddressInfo?type=customer&id=' + idEntity, type:'GET'},
                     update: {url:'api/AddressInfo', type:'PUT'},
                     destroy:{url:'api/AddressInfo',type:'DELETE'},
                     create: {url:'api/AddressInfo?idCustomer=' + idEntity, type:'POST'}
   },
                
                 pageSize: 3,
                 batch:false,                
                  schema: {
                                model: {
                                    id: "idAddressInfo",
                                    fields: {
                                        idAddressInfo: { editable: false },
                                        Description: {type:"string" },
                                        Address: {type:"string" },
                                        City: { type:"string"},    
                                        State: { type:"string"} ,                                 
                                        ZipCode: { type:"string"}                                       
                                    }
                                }
                            }
                
             },             
             toolbar: [{name:"create",text:"",width:20}],
             columns: [                                             
                            { field:"Description", title: "Description", width: "180px" },
                            { field:"Address", title: "Address", width: "200px" },
                            { field: "City", title:"City", width: "150px" },
                            { field: "State", title:"State", width: "90px" },
                            { field: "ZipCode", title:"Zip", width: "60px" },
                            
                            { command: [{name:"edit",text:"",width:20}, {name:"destroy",text:"",width:20}], title: " ", width: "150px" }],
             editable:{ 
                mode: "popup"
              
             }
        });

Clicking in "Create" button a void "Edit" popup is shown (not a "Create" popup as I axpected)...
Clicking the "Update" on the popup dialog the PUT method is invoked instead PUSH... so the server persisting procedure fails.
What is the problem?

1 Answer, 1 is accepted

Sort by
0
Sergio
Top achievements
Rank 1
answered on 17 Oct 2012, 12:51 PM
I've fixed the bug. It was a problem in my server
The POST method is correctly invoked. 

It is possible to modify the Title, and the buttons of pupup window in case of create action?
Tags
Grid
Asked by
Sergio
Top achievements
Rank 1
Answers by
Sergio
Top achievements
Rank 1
Share this question
or