Telerik Forums
Kendo UI for jQuery Forum
1 answer
176 views

Hi Telerik,

 

Does pivot grid has ability to enable this mode?

If yes, can you share sample code.

Tsvetomir
Telerik team
 answered on 28 Nov 2019
8 answers
1.6K+ views
Howdy All,
While binding to an array source is it possible to determine the index of the current array element? 

The documentation for using the Source binding gives the following example:

<ul data-template="ul-template" data-bind="source: products">
</ul>
<script id="ul-template" type="text/x-kendo-template">
    <li>
        id: <span data-bind="text: id"></span>
        name: <span data-bind="text: name"></span>
    </li>
</script>
<script>
    var viewModel = kendo.observable({
        products: [
            { id: 1, name: "Coffee" },
            { id: 2, name: "Tea" },
            { id: 3, name: "Juice" }
        ]
    });
 
    kendo.bind($("ul"), viewModel);
</script>


What I'm trying to do is get a reference to the index of the current array element from within the template.
For Example:

<li>
        index: <span data-bind="text: index"></span>
        id: <span data-bind="text: id"></span>
        name: <span data-bind="text: name"></span>
</li>

Does anybody know if there's a way to get access to the index from within the template?

Any insight would be greatly appreciated. 
Thanks in advance
Seamus
John
Top achievements
Rank 1
 answered on 28 Nov 2019
1 answer
108 views
Hello,

I have kendo treeview in my MVC project. Treeview context menu was showed well in IE by right mouse clicking, but in Firefox the treeview context menu was covered by page default context menu. Could someone have the tip to resolve the context menu issue with Firefox?  Below are pieces of code for context menu. Attached image is context menu showed in IE and Firefox.

Thanks in advance.

...
    function CreateContextMenu(targetTree) {
        var cxtMenuUl = $('#treeViewContextMenu');
        cxtMenuUl.css("white-space", "nowrap");
        if (cxtMenuUl) {
            cxtMenuUl.kendoContextMenu({
                // listen to right-clicks on treeview container
                target: targetTree,
                dataSource: getContextData(),
                orientation: "vertical",
                select: selectFolderContextMenu,
                filter: ".k-state-selected",
                open: onOpenLeftContextMenu
            });
        }
    }

     function getContextData () {
        var data = [{ text: 'Delete', attr: { id: 'delete' } },
                { text: "", cssClass: "k-separator" },
                { text: 'Rename', attr: { id: 'rename' } },
                { text: "", cssClass: "k-separator" },
                { text: 'New Folder', attr: { id: 'newfolder' } },
                { text: "", cssClass: "k-separator" },
                { text: 'Upload', attr: { id: 'upload' } }];

        return data;
    }
...
Dimitar
Telerik team
 answered on 26 Nov 2019
10 answers
734 views

I have in my form an autocomplete box and a combobox.  I don't populate the comobox box until a selection is made in the autocomplete box.  This has been working fine, but I don't want the user to be able to type in the combobox so I am converting it to a dropdownlist.  After I made the change, my dropdownlist dissapears after the autocomplete box change event fires.  I stripped the code down so all it is doing is re-initializing the dropdownlist, and it still does the same thing.  Here is the code for my autocomplete box:

$("#matterCombo").width(300).kendoAutoComplete({
        minLength: 0,
        autoBind: false,
        dataTextField: "text",
        dataSource: {
            serverPaging: true,
            serverFiltering: true,
            pageSize: 5,
            transport: {
                read: {
                    url: "wsRest.svc/matters/",
                    data: {
                        client: function () {
                            return $("#clientCombo").val();
                        },
                        value: function () {
                            return $("#matterCombo").val();
                        }
                    } //data
                } //read
            } //trans
        }, //ds
        change: function () {
            $("#custom1Combo").kendoDropDownList();
        }
    });

The form loads fine, but when the change event fires, custom1Combo dissapears.

When the page loads, the dropdownlist is initialized like this:

$("#custom1Combo").width(300).kendoDropDownList();

The initial initialization is working fine and I am even able to fill in a default value, but then when I try to update it later it just dissapears.

Help please?

Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
 answered on 26 Nov 2019
1 answer
117 views

Hi,

Is it possibly to configure a particular toolbar item which always stays visible? For example, I want the "Log out" button to be visible at all times on the right side of the toolbar.

Kind Regards,

Marco

 

 

Petar
Telerik team
 answered on 26 Nov 2019
1 answer
86 views

I applied the bootstrap-v4 theme as described here

https://www.telerik.com/forums/support-for-bootstrap-4#0ycfPtGd9kqSuUyQ97z4mw

 

I noticed the menu control changes the text color to gray, so it kind of looked like the entire menu was disabled to me at first.

You can see it here 

https://dojo.telerik.com/AKuPiXOL

 

It looks like kendo is setting this style.  Not sure if this is intentional or not. 

In my project I added this style to take out the kendo color.

:not(.k-context-menu).k-menu > .k-item{
    color: inherit;
}
Ivan Danchev
Telerik team
 answered on 25 Nov 2019
1 answer
95 views

     Hi team,

Found this weird UI issue when clicking filter option in column menu on a grid. See screenshot: the text in panel is being auto-selected.

Last kendo release with Default theme, Chrome/Firefox

 

Best regards.

 

Laurent

Ivan Danchev
Telerik team
 answered on 25 Nov 2019
3 answers
273 views

Is there any way to apply column filtering to multiple columns at once? Whenever I try to add a second filter, the first is erased.

 

Thanks for any help.

 

Callam

Aleksandar
Telerik team
 answered on 25 Nov 2019
3 answers
1.4K+ views

Hello,

I need to keep the confirmation of row deletion,but would like to have it in batch

I have the grid in 'batch Editing Mode',and setting of selectable: "multiple row", so using the following code :

                EntityManageGrid.select().each(function () {

                    EntityManageGrid.removeRow($(this).closest("tr"));
                });

will result in a confirmation on each row,while this is a batch operation that should be confirmed once

Is there another method to be able to delete batch rows with single confirmation for the whole batch operation

Thanks in avance

Regards,

MOTASH

Ivan Danchev
Telerik team
 answered on 22 Nov 2019
1 answer
530 views

Hi,

Following on from a previous post

I now have a grid view as the source for my drag items and dropping onto a scheduler and this works great when the scheduler is configured to show one resource. If the scheduler has a resource group I would like to not only pick the timeslot where the item was dropped but also the resource too.

My scheduler Resources are defined as:

var resourcesParam = '?d=' + String($kk_sDivisionFk) + '&t=' + String($kk_sTeamFk) + '&a=' + String($kk_sAssignee) + '&u=' + String($UserID);
        var schedulerResources = [
            {
                field: "assignee",
                name: "Assignee",
                dataTextField: "Text",
                dataValueField: "Value",
                dataSource: {
                    transport: {
                        read: {
                            url: '@Url.Content("~/Home/GetActiveMembers")' + resourcesParam,
                            dataType: 'json'
                        }
                    }
                },
                title: "Assignee"
            }
        ];

 

Based on the previous post... my create drag area is set as:

//Make the scheduler a drop area for drag and drop.
function createDropArea(scheduler) {
 
    var grid = $("#grid").data("kendoGrid"),
    gridRowOffset = grid.tbody.find("tr:first").offset();
 
    scheduler.view().content.kendoDropTargetArea({
        filter: ".k-scheduler-table td, .k-event",
        drop: function (e) {
 
            var offset = $(e.dropTarget).offset();
            var slot = scheduler.slotByPosition(offset.left, offset.top);
            var dataItem = grid.dataItem(grid.select());
 
            if (dataItem && slot) {
                var offsetMiliseconds = new Date().getTimezoneOffset() * 60000;
                var newEvent = {
                    eID: -1,
                    status: dataItem.status,
                    assignee: XXXXX, //This should be the dataValueField from schedulerResources above (it is an integer)
                    title: dataItem.title,
                    start: slot.startDate,
                    end: new Date(slot.startDate.getTime() + (dataItem.end - dataItem.start)),
                    requestType: dataItem.requestType,
                    lastUpdatedBy: currentUser,
                    isAllDay: dataItem.isAllDay,
                    startTimezone: dataItem.startTimezone,
                    endTimezone: dataItem.endTimezone
                };
 
                //grid.dataSource.remove(dataItem); //I don't need to remove item from grid.
                scheduler.dataSource.add(newEvent);
            }
 
        }
    });
}

 

Is there a way to get the assignee value? If it helps the scheduler has been restricted to timeline, timelineWeek and timelineMonth views.

Thanks.

 

 

 

MIDAS
Top achievements
Rank 1
Iron
Iron
 answered on 22 Nov 2019
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?