Telerik Forums
Kendo UI for jQuery Forum
14 answers
1.8K+ views

https://docs.telerik.com/kendo-ui/controls/editors/dropdownlist/how-to/selection/disable-items-for-selection

 

{field: 'operDay', title: '조업요일', width: 100, editor: _this.columnEditor.dayDropDownEditor}
dayDropDownEditor : function (container, options) {
    $('<input id="' + options.field + '" data-bind="value:' + options.field + '"/>')
        .appendTo(container)
        .kendoDropDownList({
            suggest: true,
            dataSource: [
                {id:'1', name:'월요일', operDay: '월요일', isDeleted: false },
                {operDay: '화요일', isDeleted: false },
                {operDay: '수요일', isDeleted: false },
                {operDay: '목요일', isDeleted: false },
                {operDay: '금요일', isDeleted: false },
                {operDay: '토요일', isDeleted: false },
                {operDay: '일요일', isDeleted: false }
            ],
            dataTextField: 'operDay',
            dataValueField: 'operDay',
            valuePrimitive: true,
            select: function(e){
                if(e.dataItem.isDeleted){
                    e.preventDefault();
                    alert("why?");
                }
            },
            template: kendo.template($("#template").html())
 
        });
}

 

Hello, I need the feature in the link above.

Some of the dropbox items I specified are deactivated and reactivated upon request.

But I don't know how to apply that code to my code.

Because there are some differences.

I attach my code above.

 

<input id="dropdownlist" /> <button class="k-button"> Mark Oranges as deleted</button>
    <script id="template" type="text/x-kendo-template">
    <span class="#: isDeleted ? 'k-state-disabled': ''#">
       #: name #
    </span>
    </script>

 

This is the part I don't know, and it's also where the error occurs.

 

1. I think there is no ID that can be specified because it creates input dynamically.
= <input id: dropdownlist>
(There is option.field, but it is not recognized even if it is specified as #operDay.)

1-1. As a result, you cannot access the dataSource.

2. Where should I write the <script> <span> ... </ span> </ script> section?
column? jsp?

I tried to template it in a column, but I get an "isDeleted is not defined" error. I'm thinking that I don't recognize it.

Please let me know how you can use that code ...

 

 

Ravi
Top achievements
Rank 1
 answered on 05 Mar 2021
1 answer
215 views

Editor top getting blank space when Grammarly extension loaded.

see the image

how to fix the this issue on editor side. 

Martin
Telerik team
 answered on 05 Mar 2021
1 answer
143 views

I have a chart, with a grouped bubble series.  Using dates on the X-Axis, months, with a 12 month period displaying initially.  Chart has about 10 years of data, and after scrolling to the left and panning the chart, when attempting to scroll back to the right, I can't pan all the way back to the end, the scrolling stops about 6 months short.  The chart displays correctly initially, but once you scroll the recent months off of the view, you can't get back to them.

Wondering if this is an issue that has been encountered before, and if so, there may be a known data cause or some configuration setting I'm missing.

If necessary, I can create a sample.  Current chart code is bound to API services, so a little difficult to just drop into this post.

Nikolay
Telerik team
 answered on 05 Mar 2021
3 answers
130 views

Hi,

Does anyone know how to customize the size of every components in Kendo Form using JQuery at the beginning of form component initialization stage?

Thanks.

 

Eric

 

Petar
Telerik team
 answered on 05 Mar 2021
4 answers
244 views

I want to create a wizard from an existing form that includes several kendo widgets. The form and its widgets work fine until I initiate the wizard. The first step of the wizard includes a country dropdown and that stops working as soon as the wizard has been initialised. The dropdown doesn't respond to any clicks, nor are there any errors displayed in the browser console. One of the checkboxes should trigger a view model method, but that's not working either.

The form is used to add data to the database. The same form is used to update the database (without needing a wizard) and works as intended when updating.

Help?

Regards,

Henk

Henk
Top achievements
Rank 1
 answered on 04 Mar 2021
3 answers
283 views

I am not sure if the TabStrip control is the right one to use for what I am trying to do.

Below is the screenshot of what I am working on:

Bryan Patrick
Top achievements
Rank 1
 answered on 04 Mar 2021
4 answers
109 views
Hi,

I'm able to filter the grid between two date ranges but if the users just enters the 2nd date and leaves the first date bank I'm not able to filter those results. Need some help getting the end date to filter as well.

Here is code below: 

 

function FilterGrid() {
    var grid = $("#grid").data("kendoGrid");
 
    var orderDateFromFilter = $("#FromDate").val().split('-');
    var orderDateToFilter = $("#ToDate").val().split('-');
 
    if (orderDateFromFilter == "") {
        orderDateToFilter = "";
        $("#ToDate").val("");
        $("#text5").val("");
        $("#text6").val("");
    }
    else if (orderDateToFilter == "") {
        $("#ToDate").val($("#FromDate").val());
        $("#text6").val($("#text5").val());
        orderDateToFilter = orderDateFromFilter;
    }
 
    var mydate1 = new Date(orderDateFromFilter[0], orderDateFromFilter[1]-1, orderDateFromFilter[2]);
    var mydate2 = new Date(orderDateToFilter[0], orderDateToFilter[1]-1, orderDateToFilter[2]);
 
    var filter = { logic: "and", filters: [] };
 
    filter.filters.push({ field: "FilterByDate", operator: "gte", value: mydate1 });
    filter.filters.push({ field: "FilterByDate", operator: "lte", value: mydate2 });
 
    if (orderDateFromFilter== "" && orderDateToFilter == "")
        filter = "";
    grid.dataSource.filter(filter);
}
Mihaela
Telerik team
 answered on 04 Mar 2021
1 answer
158 views

using kendo version 2015.3.1111 (limitation to this version due to other maximum targets of system)

I've noticed using the kendo Grid that the below element is added to the DOM for each column (note the positioning is different per column):

<div class="cover" style="left: 47px; top: 1932.15px; width: 90px; height: 30px; position: absolute;">

 

On edit and save/cancel of a row this element is duplicated again and again. I noticed the issue as I hide an element on the main page when i hit edit in the grid and the positioning then changed and the hover/clickable area of the button was not on top of the button.

Note that if i override the style with display: none i fix the clicking issue without any noticeable side-effects however the DOM is still polluted with these numerous div elements.

Can anyone provide some insight and/or a resolution to remove these elements?

Tsvetomir
Telerik team
 answered on 04 Mar 2021
1 answer
133 views

I want to identify or handle the tiles separately through JavaScript by the id or custom attribute e.g. data-functional-id. 

is there any provision which will allow me to add custom attribute to the tiles? 

Tsvetomir
Telerik team
 answered on 04 Mar 2021
1 answer
111 views

Hi,

At the moment I have no items in the Scheduler. After investigating I came to the conclusion there are 2 types of e given from the scheduler. I know because I handled the databound like this:

function scheduler_dataBinding(e) {
console.log(e);
}

When I do so I have the following log in the console shown in the attachement.

I think that because of the second databound, there are no items in the scheduler.

Kind regards,

Roel Alblas

 

Aleksandar
Telerik team
 answered on 04 Mar 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?