This is a migrated thread and some comments may be shown as answers.
Delete dialog firing twice...
1 Answer 79 Views
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 10 May 2013, 03:30 PM
For some reason the delete dialog is firing twice.  It doesn't call the destroy function until after you go through both dialogs.

Any ideas?

001.<div id="grid"></div>
002. 
003.<script>
004.    $(document).ready(function() {
005.        var crudServiceBaseUrl = "main.php?a=quotereport", dataSource = new kendo.data.DataSource({
006.            transport : {
007.                read : {
008.                    url : crudServiceBaseUrl + "&read=1",
009.                    dataType : "json"
010.                },
011.                destroy : {
012.                    url : crudServiceBaseUrl + "&destroy=1",
013.                    dataType : "json"
014.                },
015.                parameterMap : function(options, operation) {
016.                    if (operation !== "read" && options.models) {
017.                        return {
018.                            models : kendo.stringify(options.models)
019.                        };
020.                    }
021.                }
022.            },
023.            batch : true,
024.            schema : {
025.                data: "data",
026.                total: "total",
027.                model : {
028.                    id : "id",
029.                    fields : {
030.                        id: {
031.                            validation : {
032.                                required : true
033.                            }},
034.                        first_name: {
035.                            validation : {
036.                                required : true
037.                            }},
038.                        last_name: {
039.                            validation : {
040.                                required : true
041.                            }},
042.                        dob: {
043.                            validation : {
044.                                required : true
045.                            }},
046.                        email: {
047.                            validation : {
048.                                required : true
049.                            }},
050.                        phone: {
051.                            validation : {
052.                                required : true
053.                            }},
054.                        age: {
055.                            validation : {
056.                                required : true
057.                            }},
058.                        date: {
059.                            validation : {
060.                                required : true
061.                            }}
062.                    }
063.                }
064.                }
065.        });
066. 
067.        $("#grid").kendoGrid({
068.            dataSource : dataSource,
069.            pageable : false,
070.            height : 430,
071.            editable: 'inline',
072.            columns : [{
073.                field : "id",
074.                title : "ID"
075.            }, {
076.               field  : "date",
077.               title  : "Date"
078.            }, {
079.                field : "first_name",
080.                title : "First Name"
081.            }, {
082.                field : "last_name",
083.                title : "Age"
084.            }, {
085.                field : "dob",
086.                title : "Birthday"
087.            }, {
088.                field : "email",
089.                title : "Email"
090.            }, {
091.                field : "phone",
092.                title : "Telephone"
093.            }, {
094.                field : "age",
095.                title : "Age"
096.            },           
097.            {
098.                command : ["destroy"],
099.                title : " ",
100.                width : "160px"
101.            }]
102.        });
103. 
104.    });
105.</script>

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 12 May 2013, 07:06 AM
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or