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

Editor Template w/Kendo Grid - How?

1 Answer 52 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
GCS
Top achievements
Rank 1
GCS asked on 25 Nov 2015, 02:45 AM

I'm trying to place a Kendo Grid inside of an EditorTemplate. I'll be using this as a select list, so to speak. 

 However, nothing I do seems to get my grid to display. Any examples on how to do something like this?  All the examples I see are basically simple control types.

 So given: 

 

<script type="text/x-kendo-template" id="schedulerTemplate">
    <!-- What do I put here. -->
</script>

I thought the following would work inside of a $(function() {} block

// Workout Grid
 $("#workoutgrid").kendoGrid({
     dataSource: {
 
         transport: {
             read: {
                 url: "/Workout/GetWorkoutList/",
                 dataType: "json"
             },
             create: {
                 url: "/Workout/Create/",
                 type: "POST",
                 dataType: "json"
             }
         },
         batch: true,
         pageSize: 20,
         schema: {
             model: {
                 id: "Id",
                 fields: {
                     Id: { editable: false, nullable: true },
                     Name: { type: "string" },
                     Description: { type: "string" }
                 }
             }
         }
     },
     pageable: true,
     sortable: true,
     silectable: true,
     selectable: true,
     reorderable: true,
     resizable: true,
     pageable: true,
     filterable: {
         mode: "row"
     },
     toolbar: [{
         template:
             '<a class="k-button k-grid-custom-command" href="/Admin/Movement/Edit/#=0#">Add New</a>'
     }],
     columns: [
         { hidden: true, field: "Id" },
         {
             field: "Name", title: "Workout", filterable: {
                 cell: {
                     operator: "contains"
                 }
             }
         },
         {
             field: "Description", title: "Description", filterable: {
                 cell: {
                     operator: "contains"
                 }
             }
         },
         {
             field: "WorkoutTypeId", title: "WorkoutType", filterable: {
                 cell: {
                     operator: "contains"
                 }
             }
         }]
     //{ title: "Action", width: 80, template: '<a href="/Admin/Movement/Edit/#=Id#">Edit</a>' }]
 });

No dice, however.  Any suggestions? 

 

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 26 Nov 2015, 10:23 AM
Hi Dave,

Currently we have no such example for the Scheduler, however you can check the following one which shows valid approach that can be used in your case:

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
GCS
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or