kendo drop down list in Grid template

1 Answer 1895 Views
Grid
Sapandeep
Top achievements
Rank 1
Sapandeep asked on 07 Apr 2017, 08:27 PM

I have a grid which i need to open as editable and i am showing all fields and columns with editable controls.in this case i am showing  html5 dropdown .  How can i change it to Kendo Dropdown list?

 

Please advise.

 

 

title: "Licensed/UnLicensed",
                               template: function (dataItem) {

if (dataItem.InputControl === "DropDown") {
                                           var cntrls = '<div class="col-xs-4"><select class="form-control input-sm" id ="selval' + dataItem.CarePointID + ' " data-bind="value:FormVal"';
                                           if (dataItem.Mandatory)
                                               cntrls += ' required ';
                                           cntrls += ' tabindex= "' + dataItem.CntrlTabIndex + '" ';
                                           cntrls += ' >';
                                           if (questOptions.length > 0) {
                                               cntrls += '<option value="" >Select value</option>';
                                               $.each(questOptions, function (opnum, opObj) {
                                                   var cntrl = '<option value="' + opObj.DropDownValue + '">' + opObj.DropDownText + '</option>';
                                                   cntrls += cntrl;
                                               });
                                               cntrls += "</select></div>";
                                               
                                           }
                                                
                                           return cntrls;
                                       }

    }

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 11 Apr 2017, 06:03 PM
Hello,

Please refer to this online demo which demonstrates how to use a KendoUI DropDownList widget as custom editor.
http://demos.telerik.com/kendo-ui/grid/editing-custom

Regards,
Pavlina
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Sapandeep
Top achievements
Rank 1
commented on 27 Apr 2017, 07:35 PM

i got it resolved by using templates and  not using grid at all. 
Tags
Grid
Asked by
Sapandeep
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or