Telerik Forums
Kendo UI for jQuery Forum
1 answer
234 views

Hi, 

Im basing this question on the Upload Confirmation Dialog (https://docs.telerik.com/kendo-ui/knowledge-base/upload-confirmation-dialog). If the user selects 'Cancel' all the existing files are visually cleared. After this I would like to re-add (visually) any existing files.

I've tried setting 'e.sender.options.files' to the initial file list, and while the widget data is updated, its not updated visually. See Dojo, https://dojo.telerik.com/odoDODUZ.

Note: Your original demo doesnt actually work, the upload continues to fail, however I've tested the behavior in my local environment, and it is as I've described.

Please advise, Thanks,
Grant

 

Ivan Danchev
Telerik team
 answered on 08 Jan 2020
3 answers
319 views
I need a method to select and use the day of the week, Mon, Tue Wed, Thu, Fri, Sat.

Is there such a method?
Nikolay
Telerik team
 answered on 08 Jan 2020
8 answers
245 views

Is possible to add alphabetical order after number in index items in kendo editor. Here we used  Kendo UI v2015.2.902 and struggle regarding this. If its possible please share programming coding also.

For example :

1.a,

1.b,

1.c,

1.1.a

2.c

2.d

Ivan Danchev
Telerik team
 answered on 08 Jan 2020
2 answers
196 views

Hi,

I have the following code in a global.js library:

$.ajaxSetup({
    // A pre-request callback function used to modify the xhr object before it is sent
    beforeSend: function(xhr){
        // Set csrf if request type is POST, PUT or DELETE
        if (this.type !== "GET") {
            xhr.setRequestHeader(csrfHeader, csrfToken);
        }
    }
});

This set the csrf token for any REST call that modifies data (POST, PUT, DELETE).

The problem is that the Upload widget does not use it, and the server requests are being rejected due to missing authorization (403 Response). This forces me to init. my Upload widget with the following callback:

upload: function(e) {
    // Adds the csrf tokens to perform POST REST calls
    const xhr = e.XMLHttpRequest;
    if (xhr) {
        xhr.addEventListener("readystatechange", function() {
            if (xhr.readyState === 1 /* OPENED */) {
                xhr.setRequestHeader(csrfHeader, csrfToken);
            }
        });
    }
}

 

Please advise why this is necessary and why this is required. Does the Upload not use jQuery to execute the Ajax calls?

Thanks
Grant

Veselin Tsvetanov
Telerik team
 answered on 08 Jan 2020
1 answer
316 views

I'm using the multselect dropdown which is being populated from a db, how can I capture what the users is typing in the box, so I can filter based off of what the user is typing?

 

Example: if they start typing:

  John

 

i want to pass John to my service and filter the users that are named John.

If  I use var x = $('name').data("kendoMultiSelect').text();

I get an error: Cannot read property 'text' of undefined. Is there another way to grab the text from the multiselect?

Ivan Danchev
Telerik team
 answered on 07 Jan 2020
4 answers
631 views

Hi,

Currently we have data that 1 parent can have multiple children meanwhile a child can belongs to multiple parents. Does treelist support this scenario?

Per what we see now the child will be placed under only 1 parent (maybe the 1st one) but other parents don't have this child available.

Thanks.

Georgi
Telerik team
 answered on 07 Jan 2020
2 answers
138 views

Hello,

There is a question that needs to be solved first.

Q. How do multiple dropdownlists use a single datasource?


This question is not "showing the same data".
(call by value)

"Accessing only one data source address that shares data attributes, changed current values, etc."
(call by address)


If this question is resolved, you should move on to the next question.

The solution I want is this:

All dropdownlists exist in multiple rows in a grid.


If you selected data 0 in row 0, you should not be able to select data 0 in another row.

I've seen the example below, but it's not a way to disable the data I've selected, only to manually disable it.

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

What is the way?

Martin
Telerik team
 answered on 06 Jan 2020
1 answer
410 views
     I have a numericTextBox and I would like the user to be able to enter a percentage in either of two formats. The end result should always display the number as a percentage but store it as a decimal. For example, the user should be able to either enter .10 or 10% in the box. The screen should then show 10% when the user tabs out but send .1 when the form is submitted. Here is what I have so far: 

$("#myPercentageChoice").kendoNumericTextBox({
    format: "p1",
    spinners: false,
    value: 0,
    decimals: 3
});
Nikolay
Telerik team
 answered on 06 Jan 2020
4 answers
735 views

Hi,

I'm using 2019.3.1023 version. I have a treelist which retrieving data from remote source. When user select a time range in a list the treelist will be triggered to re-fetch the data with the new selected parameter. The datasource is updated succussfully and treelist is refreshed. But the pager is not updated accordingly.

The treelist configuration:

$('#gridtable').kendoTreeList({
                autoBind: false,
                dataSource: {
                    transport: {
                        read: {
                            url: top.$.rootUrl + '/PPM_Contract/Contract/GetList',
                            dataType: "json",
                            data: function () {
                                return {
                                    queryJson: JSON.stringify({
                                        // parameters send to remote source
                                    })
                                };
                            }
                        }
                    },
                    schema: {
                        data: "data",
                        total: function (response) {
                            return response.data.length;
                        },
                        model: {
                            id: "F_Id",
                            parentId: "externalId",
                            expanded: true,
                            fields: {
                                // some fields setting
                            }
                        }
                    }
                },
                filterable: true,
                sortable: true,
                resizable: true,
                selectable: true,
                pageable: {
                    pageSize: 100
                },
                dataBound: function (e) {
                    // some logic for styles
                },
                columns:[
                    // some columns
                ]
            });

 

The trigger of refreshing the treelist:

// some parameter assignment
// then call read method on datasource
$("#gridtable").data("kendoTreeList").dataSource.read();

 

With first selection of the parameter, 124 items are returned and 2 pages initialized, which is correct (attached as 1stTry.png).

With second selection, 248 items returned, total number is updated but the pager is not (should be 3 pages but stays as 2. Attached as 2ndTry.png).

How to refresh the pager with datasource?

Thanks.

Randy
Top achievements
Rank 1
Veteran
 answered on 06 Jan 2020
20 answers
1.9K+ views
Hello.

Currently I know how to filter Server true / false and I'm using filterable.

However, both methods have their advantages and disadvantages and are looking for more efficient ways.



1. Server filtering: true
The advantage of this method is that it is very fast.

However, since you only search within the page called Limit, you cannot perform filtering on all data.


2. Server Filtering: false
The advantages and disadvantages of this approach are the opposite of true server filtering.

You can query and filter all the data in the database.

However, if tens of thousands or hundreds of thousands of data passes, there will be a delay of several tens of seconds depending on the network line.


You can also create a custom filter to do a Query, but I don't think it's a good idea because it requires extra work on every field that needs filtering.


Is there a more efficient filtering method inside Kendo?
Tsvetomir
Telerik team
 answered on 03 Jan 2020
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?