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

Inline Editing Custom Template

3 Answers 569 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gaetano
Top achievements
Rank 1
Gaetano asked on 01 Oct 2013, 02:03 PM
Hi Guys,
I have a Grid bound to a remote datasource like this

$("#rolesGrid").data("kendoGrid").setDataSource(new kendo.data.DataSource({
            transport: {
                read: {
                    url: "Url1",
                    type: "POST"
                },
                update: {
                    url: "Url2",
                    dataType: "json",
                    type: "POST"
                }
            },
            schema: {
                model: {
                    id: "Id",
                    fields: {
                        Id: { type: "int", editable: false },
                        Name: { type: "string", editable: true },
                        Description: { type: "string", editable: true },
                        Roles: { type: "odata", editable: true }
                    }
                }
            },
            pageSize: 10,
            sort: { field: "Nome", dir: "asc" }
        }));
The Roles field contains a list of custom object; each of this object has some simple properties (int and string).
When the grid is loaded I show a simple count of Roles list for each record.
es
{
     field: "Roles",
     title: "roles",
    template: "<div>#= Roles.length#</div>"
}
I set the edit mode as INLINE.
Is it possible to use a custom template so that text properties are edited with textboxes as usual and  "Roles" property is rendered as, for example, a dropDownList ???

I tried with a template as I'd like to do with popup edit mode but it seems to be useless.

Thanks
Fabio

3 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 01 Oct 2013, 02:40 PM
Hi Fabio,

Please check the columns.editor function that allows the developer to specify a custom UI editor for the column. Actually we have a demo which demonstrates similar scenario. You can view it at that link:

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Zoran
Top achievements
Rank 1
answered on 26 Nov 2018, 06:03 AM

The demo doesn't give an answer to the author's question: "Is it possible to use a custom template for Inline edit-mode?"

Not for a column, for a whole row. Please advice.

Looking forward to your answer,

Thanks,

0
Viktor Tachev
Telerik team
answered on 27 Nov 2018, 01:59 PM
Hi Zoran,

Providing a template for the entire row is not available out of the box. However, the editor for each column can be configured individually.


Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Gaetano
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Zoran
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or