Telerik Forums
Kendo UI for jQuery Forum
12 answers
799 views

Is there a way to use validation on spreadsheet cells that includes a regex?  I have two validators I need to set up.  The first is just to make sure it is an integer, and the second needs a string with a max length on it.  For the integer, I started with dataType of "number", but it required a comparer.  If I included a comparerType of "greaterThan", I needed a from.  

Also, is there a place where we can find the allowed fields for comparerType along with examples?

Thanks!

Dimitar
Telerik team
 answered on 26 Nov 2020
2 answers
8.9K+ views
Hi guys, congrats on the Q1 release, it's really awesome!
Anyway, I was working on something and it occurred to me that It would be cool if there was a new option for implementing custom filtering (only available for local fitlering). Something such as:

var dataSource=...;
var filterValues=[1,5,7];
dataSource.filter({
  operator: "custom",
  value: function(item) {
    return (filterValues.indexOf(item.property) == -1);
  }
});


or maybe just pass the function to the filter such as dataSource.filter(function(item) {...})
I hope you consider this for a future release.

Thanks,
Andrés
Georgi
Telerik team
 answered on 26 Nov 2020
2 answers
3.2K+ views

Doing it this way:

var uploadFile = $("#documents-files").data("kendoUpload");

var file2 = uploadFile.getFiles();

formData.append('files2',file2[0]);

$.ajax({ url: 'foo.php', type: 'POST', data: formData, async: false, cache: false, contentType: false, enctype: 'multipart/form-data', processData: false, success: function (response) { console.log(response); } });

 

And in PHP server var_dump($_POST) :

array(1) {["files2"]=>string(15) "[object Object]"}

 

And $_FILES is empty.

 

 

If I send file in standard way, WITHOUT KendoUpload widget 

 var files = document.getElementById('documents-files');
 var file = files.files[0];

it works, superglobal $_FILES is filled with file data.

kumara
Top achievements
Rank 1
 answered on 26 Nov 2020
11 answers
1.9K+ views

Hello,

  We are having a problem uploading multiple files on a server running HTTP/2.  Single files upload fine.  I used the "batch" property and that seems to work ok since it's one request.  We disabled HTTP/2 and went back to HTTP/1.1.  Everything seemed to work fine.
I downloaded the newest trial version it is still has the problem. Is there any way around this issue without using the "batch" property?

Thanks in advance!

Martin
Telerik team
 answered on 25 Nov 2020
1 answer
150 views

I am working on Kendo MVVM Grid with row-template. i have applied merged cells (rowspan) inside the row-template.Everything is working fine but when i applied filters on column then that time Grid is not showing any result.

i have tried Filtering without merged cells, its working fine

 

<div data-role="grid"
             id="ProessedReconciliationGrid"
             style="height:250px;"
             data-toolbar="[{'template': kendo.template($('\\#ProessedReconciliationGridTitle').html())}]"
             data-animation="false"
             data-filterable="true"
             data-scrollable="true"
             data-resizable="true"
             data-bind="source: ProessedReconciliationData,visible:isProcessedDivVisible"
             data-columns='[
                     { "field": "SupplierInvoiceReconciliationId", hidden:"true"},
                     { "field": "SI_DocumentNumber", "title": "Doc. No.",width: "80px",editable: function () { return false; }},
                     { "field": "DisplaySI_TransactionDate", "title":"Doc. Dt.","width":"100px",editable: function () { return false; }},
                     { "field": "SI_BookingReference","title":"Booking Ref.",editable: function () { return false; }},
                     { "field": "SI_PassengerName", "title": "Passenger",editable: function () { return false; }},
                     { "field": "SI_Amount", "title": "Amount",editable: function () { return false; },format:"{0:n2}",attributes:{style:"text-align:right;"}},
                     { "field": "SI_Amount", "title": "Amount Payable",editable: function () { return false; },format:"{0:n2}",attributes:{style:"text-align:right;"}},
                     { "field": "DOC_DocumentNo", "title": "Doc. No.",width: "80px",editable: function () { return false; }},
                     { "field": "DisplayDOC_DocumentDate", "title":"Doc. Dt.","width":"100px",editable: function () { return false; }},
                     { "field": "DOC_BookingReference","title":"Booking Ref.",editable: function () { return false; }},
                     { "field": "DOC_PassengerName", "title": "Passenger",editable: function () { return false; }},
                     { "field": "DOC_Total", "title": "Amount",editable: function () { return false; },format:"{0:n2}",attributes:{style:"text-align:right;"}},
                     { "field": "DOC_Total", "title": "Amount Payable",editable: function () { return false; },format:"{0:n2}",attributes:{style:"text-align:right;"}},
                     { "field": "DOC_DocumentID", "title": "Int. ID",width: "125px",editable: function () { return false; }},
                     { "field": "MatchDescription", "title": "Match Criteria",editable: function () { return false; }},
                     { "field": "MatchDifference", "title": "Diff",editable: function () { return false; },format:"{0:n2}",attributes:{style:"text-align:right;"}},
                     { "field": "Payable", "title": "Payable",editable: function () { return false; },format:"{0:n2}",attributes:{style:"text-align:right;"}},
                     { "field": "Action", "title": "Action",editable: function () { return false; }
<script id="ProessedRowTemplate" type="text/x-kendo-template" class="KendoExtTemplate">
    <table class="table">
        #if(data != null){#
        #if(data.length == 1 ){#
        <tr>
 
            <td>#=data[0].SI_DocumentNumber#</td>
            <td>#=data[0].DisplaySI_TransactionDate#</td>
            <td>#=data[0].SI_BookingReference#</td>
            <td>#=data[0].SI_PassengerName#</td>
            <td style="text-align:right;">#=kendo.toString(data[0].SI_Amount,'n2')  #</td>
            <td style="text-align:right;">#=kendo.toString(data[0].SI_Total,'n2')#</td>
            <td>#=data[0].DOC_DocumentNo#</td>
            <td>#=data[0].DisplayDOC_DocumentDate#</td>
            <td>#=data[0].DOC_BookingReference#</td>
            <td>#=data[0].DOC_PassengerName#</td>
            <td style="text-align:right;">#=kendo.toString(data[0].DOC_Total,'n2')#</td>
            <td style="text-align:right;">#=kendo.toString(data[0].DOC_Total,'n2')#</td>
            <td><a href="../Document/GetDossierDocument/#: data[0].DOC_DocumentID #" target="_blank" title="#: data[0].DOC_DocumentID #" style="white-space: nowrap;">#: data[0].DOC_DocumentID #</a></td>
            <td>#=data[0].MatchDescription#</td>
            <td style="text-align:right;">#=kendo.toString(data[0].MatchDifference,'n2')#</td>
            <td style="text-align:right;">#=kendo.toString(data[0].Payable,'n2')#</td>
            <td><i class="fas fa-unlink text-danger" onclick="DeleteProcessedRow('#=data[0].SupplierInvoiceReconciliationId #')" title="Break/Remove" aria-hidden="true"></i></td>
        </tr>
        #}else {#
        #for(var x=0; x < data.length; x++){#
        <tr>
            # var rowspanVal = data.length #
            <td>#=data[x].SI_DocumentNumber#</td>
            <td>#=data[x].DisplaySI_TransactionDate#</td>
            <td>#=data[x].SI_BookingReference#</td>
            <td>#=data[x].SI_PassengerName#</td>
            <td style="text-align:right;">#=kendo.toString(data[x].SI_Amount,'n2')#</td>
            <td style="text-align:right;">#=kendo.toString(data[x].SI_Total,'n2')#</td>
            <td>#=data[x].DOC_DocumentNo#</td>
            <td>#=data[x].DisplayDOC_DocumentDate#</td>
            <td>#=data[x].DOC_BookingReference#</td>
            <td>#=data[x].DOC_PassengerName#</td>
            <td style="text-align:right;">#=kendo.toString(data[x].DOC_Total,'n2')#</td>
            <td style="text-align:right;">#=kendo.toString(data[x].DOC_Total,'n2')#</td>
            <td><a href="../Document/GetDossierDocument/#: data[x].DOC_DocumentID #" target="_blank" title="#: data[x].DOC_DocumentID #" style="white-space: nowrap;">#: data[x].DOC_DocumentID #</a></td>
 
            #if(x == 0){#
            <td rowspan="#: rowspanVal #">#=data[x].MatchDescription#</td>
            <td rowspan="#: rowspanVal #" style="text-align:right;">#=kendo.toString(getMatchDifference(data),'n2')#</td>
            <td rowspan="#: rowspanVal #" style="text-align:right;">#=kendo.toString(getPayableAmount(data),'n2')#</td>
            <td rowspan="#: rowspanVal #"><i class="fas fa-unlink text-danger" onclick="DeleteProcessedRow('#=data[0].SupplierInvoiceReconciliationId #')" title="Break/Remove" aria-hidden="true"></i></td>
            #}#
        </tr>
        #}#
        #}#
 
        #}#
    </table>
 
</script>
},
             ]'
             data-row-template="ProessedRowTemplate" data-groupable="false" data-selectable="row"
             data-editable="false">
        </div>

 

Eyup
Telerik team
 answered on 25 Nov 2020
1 answer
617 views

I'm trying to filter the grid by using the datepicker but I'm using an external filter outside of the grid and its not working. Here is some of my code below open to any suggestions to make this work. Thanks!

 

<div id="filters">                                             

<input id="text3" type="text" class="k-textbox" placeholder="Filter by Date">                                         

</div>

<div><div id="grid"></div></div>

JS:

$("#text3").kendoDatePicker({             

change: function () {                 

var value = this.value();                 

if (value) {                     

grid.dataSource.filter({                         

field: "Opened_at",                         

operator: operator,                         

value: value                     

});                 

} else {                     

grid.dataSource.filter({});                 }             }         });

 

Petar
Telerik team
 answered on 25 Nov 2020
1 answer
541 views

I have a slider where one can increase the zoom in/out with the help of the slider. whenever the user increases the zoom as of now now I am changing the width of this table("k-scheduler-table") dynamically in the scheduler view. In total there are 4 tables with such class but I am changing only the two tables width dynamically. When I do this I am refreshing my timeline through code and it works without any problem. but the data which is there inside the timeline with a specific time. for instance consider a task from 6am to 6:30am. Now after increasing the zoom task remains at some other timeline rather than at 6am-6:30am. and if I use scheduler.refresh() then my width which I have setted dynamically for the table classes is no longer and zoom effect is gone. I need an idea what can i do.

1-)Help me by refreshing the task to the current time-zone(only task-time-zone not the entire scheduler so that the zoom remains same)
2-)Or else refresh the scheduler and somehow I should pass the two table classes width dynamically

You can find the problem in the attached image


Aleksandar
Telerik team
 answered on 25 Nov 2020
1 answer
121 views
Hi, I'm currently on trial and exploring the Kendo Pivot Grid feature.

I'm wondering is it possible to trigger interaction of the pivot grid element from externally element.
For example a button that when click, will expand this particular column members.

Angel Petrov
Telerik team
 answered on 25 Nov 2020
2 answers
150 views

According to following example (https://demos.telerik.com/kendo-ui/form/index), it is great and easy to create a kendoForm with validation.

...but I would like to customize rendered form, for example, I would like to place formItems into tabstrip

...or I would like to move some items, add custom text between them and etc...

 

Does exists any way for this (...except using react :-D ) ...or is it possible to do this with another way => generate kendoForm from existing bootstrap html form (with all kendo form features and kendo validation)?

 

Thanks a lot for each idea.

 
Stoyan
Telerik team
 answered on 24 Nov 2020
3 answers
346 views

Hi I have a working application with Jquery autocomplete, Jquery date picker and so on. I was asked to replace a simple textbox with richtext boxes for a few fields. Since we have a license for Telerik, I decided to go with the Kendo Jquery and the UI is perfectly working by referencing.

<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2020.2.617/styles/kendo.default-v2.min.css" />
<script src="https://kendo.cdn.telerik.com/2020.2.617/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2020.2.617/js/kendo.all.min.js"></script>

I am yet to hookup the database side but in the mean time, If I insert Kendo, the Jquery datepicker is throwing error. "Error: Object doesn't support property or method 'datepicker'". Also, auto populate doesnt trigger.

Are there any conflict of using Jquery and Kendo? or are there any duplicate reference causing this issue?

<!--<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/redmond/jquery-ui.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
-->
<link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" />
<link href="https://jqueryui.com/resources/demos/style.css" rel="stylesheet" />
<script src="scripts/jquery.numeric.js" type="text/javascript"></script>
<script src="scripts/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2020.2.617/styles/kendo.default-v2.min.css" />
<script src="https://kendo.cdn.telerik.com/2020.2.617/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2020.2.617/js/kendo.all.min.js"></script>

 


 
      <textarea id="successful" rows="5" cols="30" style="width:100%; height:840px" aria-label="successful">
      
        </textarea>
        <script>
            var successful = $("#successful").kendoEditor({
                tools: [
                    "bold",
                    "italic",
                    "underline",
                    "justifyLeft",
                    "justifyCenter",
                    "justifyRight",
                    "insertUnorderedList",
                    "createLink",
                    "unlink",
                ]
            });
        </script>

 

Please advise on this conflict. Also, I have an existing mvc textbox control  @Html.TextAreaFor(m => m.successful, new { @class = "form-control" })  which is saving in the database directly. How can I associate/hookup kendo textarea with the same control and database field called "successful" Please help.

 

Thanks in advance.

Neli
Telerik team
 answered on 24 Nov 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?