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

Inline edit not working (Edit button not displayed)

2 Answers 920 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Multi Digital
Top achievements
Rank 1
Multi Digital asked on 25 Apr 2013, 09:14 AM
Hello,

I have the problem, that I cannot inline edit my data in my grid because the edit button is simply missing. All other actions (read data, create data (inline), delete data) are working very well.

I am using a webservice to communicate with the server side.
Here is the code of my grid:

01.<script type="text/javascript">
02.    var Grid = null;
03.    var DataSource = new kendo.data.DataSource({
04.        transport: {
05.            read: { url: "GetData" },
06.            destroy: { url: "DeleteData" },
07.            update: {
08.                url: "UpdateData",
09.                type: "POST",
10.                complete: function (e) {
11.                    Grid.data("kendoGrid").dataSource.read();
12.                }
13.            },
14.            create: {
15.                url: "CreateData",
16.                type: "POST",
17.                complete: function (e) {
18.                    Grid.data("kendoGrid").dataSource.read();
19.                }
20.            },
21.            parameterMap: function (options, operation) {
22.                switch (operation) {
23.                    case "destroy":
24.                        return { id: options.Id };
25.                    case "create":
26.                        return { name: options.Name, width: options.Width, height: options.Height };
27.                    default:
28.                        return { take: options.take, skip: options.skip };
29.                }
30.            }
31.        },
32.        schema: {
33.            data: "d.Data",
34.            total: "d.Total",
35.            model: {
36.                id: "Id",
37.                fields: {
38.                    Id: { editable: false },
39.                    Name: { editable: true },
40.                    Width: { editable: true },
41.                    Height: { editable: true },
42.                    Code: { editable: true }
43.                }
44.            },
45.            errors: "d.ErrorMessage"
46.        },
47.        pageSize: 20,
48.        serverPaging: true,
49.        error: function (response) {
50.            this.cancelChanges();
51.        }
52.    });
53. 
54.    $(document).ready(function () {
55.        Grid = $("#md-contentGrid").kendoGrid({
56.            dataSource: DataSource,
57.            height: "100%",
58.            pageable: true,
59.            toolbar: [
60.               { name: "create" }
61.            ],
62.            columns: [
63.                { field: "Name" },
64.                { field: "Width" },
65.                { field: "Height" },
66.                { command: [
67.                    "edit",
68.                    "destroy",
69.                ], title: " ", width: "300px"
70.                }
71.            ], editable: "inline"
72.        });
73.    });
74.</script>
I have been trying now for hours, but stil no success to get the inline edit feature working. I hope someone call help me a bit.
Thank you very much.

2 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 29 Apr 2013, 07:53 AM
Hello Andreas,

Your code looks OK. There is no obvious reason for the edit command to not show, especially when the destroy command which is placed next to edit button, is being rendered.

I tested your code in this sample page and got it working as expected. Could you please let me know what I am missing? Can you send me a small project that demonstrates the issue? In this way I would be able to run and debug your exact configuration locally. Please provide such sample and I will check it right away.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Multi Digital
Top achievements
Rank 1
answered on 29 Apr 2013, 01:15 PM
Hello,

thanks for your help, but I have just found the solution at last.
The problem was that I used an outdated version of the "file kendo.all.min.js" (v2012.2.710). Now, I have tried it with the latest version and it is working properly!

Thanks.
Tags
Grid
Asked by
Multi Digital
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Multi Digital
Top achievements
Rank 1
Share this question
or