0

I am using jquery version of kendo ui grid. See the sample below. I am using a custom kendo drop down editor, when row is having a single peron name. However multiple names are binded to the grid in a comma separated manner by using template. But when on selection from the dropdown it is returning me the person name rather than the entire selected object. How to return the selected object fom kendo dropdown to the kendo UI grid.

Persons Column

Peter,John

Russel

Grid Template:

field: "PeronNamesList", 
title: "Names", editor: nameEditor,
template: function (dataItem) {
         if (dataItem.PeronNamesList.length > 0) {
               var names="";
               for (var i = 0; i < dataItem.PeronNamesList.length; i++) {
                   tasks += dataItem.PeronNamesList[i].Name + ",";
               }
               return names;
         } 
         else {
               return "";
         }
 }
Pramod Gharu
  • 1,105
  • 3
  • 9
  • 18
biju m
  • 79
  • 1
  • 12
  • Can you provide jsfiddle for your problem? – Devendra Soni Sep 02 '16 at 06:33
  • Hi Devendra, Thanks for your response. Since I am new to the kendo world, I am finding some diffculty in structuring things in jsfiddle Please go through this jsfiddle link. You may get a fare idea of what i want to achieve. http://fiddle.jshell.net/FGtGy/34/ – biju m Sep 02 '16 at 07:13
  • The dropdown will result either text or the value to the grid custome template. I need the entire object set. – biju m Sep 02 '16 at 07:15
  • i have ported your code over to the kendo dojo as this may be a better fit: http://dojo.telerik.com/uZAbO also I have changed the dropdown to a multiselect as this maybe a more appropriate control. I am confused with what it is you are trying achieve here as it seems you are mixing up two different levels of data. It may be better to split this out to either a treelist grid or alternatively use a details grid within your main grid to show the split. – David Shorthose Sep 02 '16 at 12:59
  • Thanks David for the suggestion. – biju m Sep 02 '16 at 17:50

0 Answers0