Telerik Forums
Kendo UI for jQuery Forum
1 answer
211 views

Is there any way to have multiple validations for a single cell?  I know expressions can be combined using regex or the validation.from or validation.to properties, but that means the validation messages need to be combined, and as far as I can tell, there's no way to add formatting to the validation.messageTemplate property since it only accepts a string (no HTML, no line breaks or tabs - \n\t).

For example, if I want to add validation to a cell that has a max length and restricts certain special characters, I would want to have:

  • 2 separate validations each with their own messageTemplate, OR
  • 1 validation with a messageTemplate that can be formatted

The only option I have now is a single message that must be written in a single line of text.  For complex validations, these message can end up being verbose and confusing.

Veselin Tsvetanov
Telerik team
 answered on 16 Mar 2018
3 answers
135 views

There's already an enhancement in the works to allow copy/paste of only values to prevent overriding cell formatting and validation rules.  I've found several approaches to work around this limitation, but I have not found any way to do the same thing when using the Range fillFrom method.

If I specify column-level formatting and validation, the default fillFrom works when filling vertically, but it overwrites other column rules when filling horizontally. Are there any similar workarounds for fillFrom like there are for copy/paste?

Veselin Tsvetanov
Telerik team
 answered on 16 Mar 2018
1 answer
315 views

Hi,
I am in the progress of overwriting all kendo icons to font awesome 5 icons (svg), I I've ran into a problem. 
I am somehow unable to overwrite any icons that is in the k-header. The svg code is generated and visible in inspection mode, but is not shown in the window. I am able to convert any other icon (popup editor buttons, grid cells and so on.) 
Code for overwriting

.k-icon.k-i-close:before {
    display: none;
    content: "\f00d";
    font-family: "Font Awesome 5 Regular";
}

Generated code (inspection mode)

<span class="k-icon k-i-close">
  <svg class="svg-inline--fa fa-times fa-w-12" data-fa-pseudo-element=":before" aria-hidden="true" data-prefix="far" data-   icon="times" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" data-fa-i2svg="">
    <path fill="currentColor" d="M231.6 256l130.1-130.1c4.7-4.7 4.7-12.3 0-17l-22.6-22.6c-4.7-4.7-12.3-4.7-17 0L192    216.4  61.9 86.3c-4.7-4.7-12.3-4.7-17 0l-22.6 22.6c-4.7 4.7-4.7 12.3 0 17L152.4 256 22.3 386.1c-4.7 4.7-4.7 12.3 0 17l22.6 22.6c4.7 4.7 12.3 4.7 17 0L192 295.6l130.1 130.1c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17L231.6 256z"></path>
  </svg>
    <!-- <i class="far" data-fa-pseudo-element=":before"></i> -->
</span>

 

When using the same css on the button in the same popup editor, the icon is displayed perfectly, and it generates the exact same html.

Code for button icon (working)

.k-icon.k-i-cancel:before {
    display: none;
    content: "\f00d";
    font-family: "Font Awesome 5 Regular";
}

Generated code (working)

<span class="k-icon k-i-cancel">
    <svg class="svg-inline--fa fa-times fa-w-12" data-fa-pseudo-element=":before" aria-hidden="true" data-prefix="far" data-icon="times" role="img"
        xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" data-fa-i2svg="">
        <path fill="currentColor" d="M231.6 256l130.1-130.1c4.7-4.7 4.7-12.3 0-17l-22.6-22.6c-4.7-4.7-12.3-4.7-17 0L192 216.4 61.9 86.3c-4.7-4.7-12.3-4.7-17 0l-22.6 22.6c-4.7 4.7-4.7 12.3 0 17L152.4 256 22.3 386.1c-4.7 4.7-4.7 12.3 0 17l22.6 22.6c4.7 4.7 12.3 4.7 17 0L192 295.6l130.1 130.1c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17L231.6 256z"></path>
    </svg>
    <!-- <i class="far" data-fa-pseudo-element=":before"></i> -->
</span>

 

Is there something special about the k-header tag that is preventing the icon to be shown, even though the code is generated?

I created a dojo demonstrating my issue: https://dojo.telerik.com/ODIvUfeq/4

 

Kind regards,

Christina

Orlin
Telerik team
 answered on 16 Mar 2018
2 answers
348 views

Hello there

Just got the message that some of you have holidays. Wish all those guys a good time. You are all doing a great job at Telerik!

My question: I'm using the kendoUpload widget that is working well. I'm trying to keep customers logged in if they have set that in their settings. So when the session ran out (after a certain time of user nactivity) I'm checking every server side action. If the session ran out I recreate it and send the user action again from client (now with reactivated session). That works everywhere well and the user won't realise what just happened. There is only one case I don't know how to treat the same way: kendoUpload

When the user is doing a file upload (single file mode) and there is no more serverside  session I call the upload function again but then there are no (to be uploaded) image information anymore. After thinking about this behaviour is obvious to me since I'm calling the function programmatically there are no values set  anymore.

So I wonder if it's possible to do the upload programmatically inside the upload widget (or to catch the upload data) to do the upload again? I'm using the success event  of the KendoUpload widget to get/check the upload status from the server:

a) Session still active, upload worked well

b) Session timeout, restart the upload again (programmatically)

It's not a big thing if there is no solution for that problem. So I'm asking if there is a way I could do the upload again (programmatically) with the data/file the user initially tried to upload?

Greetings

Tayger
Top achievements
Rank 1
Iron
 answered on 15 Mar 2018
17 answers
836 views

I've got a table with source binding to an array ob objects.
I want to insert multiple rows per item. Like described in the documentation, template must have only one root elment, so I thought about grouping my <tr> elemts together in an <tbody> element.

The data-binding inside the template works well. But the browser renders a second tbody element, so i ended up i something like this:

<table>
  <tbody>
    <tbody>
      <tr>
      ...
      </tr>
    </tbody>
  </tbody>
</table>

 

I've provided an exapmle: http://dojo.telerik.com/eqOSO

Does anybody has a solution for this?

THX

 

Neli
Telerik team
 answered on 15 Mar 2018
1 answer
95 views

Hello, 

We have faced some interesting behavior - 

kendo.parseDate("17:01")

returns "Tue Mar 13 2018 17:01:00 GMT+0200 (FLE Standard Time)"

Which means that this method much more data that we passing into (Tue Mar 2018 - current date). Is this expected behavior?

Thanks.

Viktor Tachev
Telerik team
 answered on 15 Mar 2018
1 answer
196 views

I'd like to allow users to dynamically change the URL of the media player.

I have tried to destroy the widget and recreate it but I get an error.

$("#mediaplayer").data("kendoMediaPlayer").destroy();

"VM66743:62 Uncaught TypeError: Cannot set property 'ontimeupdate' of undefined"

How can I update the URL of the media player and refresh the player to play the new URL?

 

Viktor Tachev
Telerik team
 answered on 15 Mar 2018
1 answer
195 views

Hi,

I am trying to implement kendo autocomplete on google maps. Normally it works fine but when I make the map full screen then autocomplete dropdown list is not selectable anymore. I tried to change the z-index but didn't work. Any ideas?

 

Here is my sample fiddle.

Magdalena
Telerik team
 answered on 15 Mar 2018
4 answers
946 views
I'm fairly new to Kendo UI/Angular and I've run into a problem which I hope is not a biggie.Basically I want to allow users to dynamically create a grid.. that means setting data source, selecting columns.. grid options etc.The data source (which is SharePoint but it ain't part of the issue...) can sometime bring a "user" field which is the id of the user rather than the name. So after doing a little bit of research I opted to use column template function to get the actual name.Below is a portion of the Column object function that I use to dynamically create columns which will be pushed into an array.The piece of code that sets template works like a charm. However, if the grid has grouping enabled, when this column is dragged to be grouped by, then it shows the id. So I thought - too easy, I'm just going to do the same thing for the groupHeaderTemplate.. but it didn't work :( .It appears that this portion of the code * dataItem." + userId + " * is not valid when grouping. It just sends an undefined to the function. I've tried different things.. like use 'value', which kendo uses in some of their examples.. but no party so far.

Any help would be greatly appreciated!

function Column(Field, Title, Type) {
if(Type == "User"){
var userId = Field + "Id";
this.field = userId
this.template = "<span ng-bind=getUserName(dataItem." + userId + ")></span>";
this.groupHeaderTemplate = "<span ng-bind=getUserName(Dont Know What to put here)></span>";
} .....
}

 

Btw. when debugging this thing, I noticed that the getUSerName function gets call an stupid amounts times when rendering the grid. Is this normal? or am I doing something wrong? I'm a bit concern about the impact it could have on the performance. I mean, my test data source had 3 results, but the function was being called like 15 times.. odd.
Stefan
Telerik team
 answered on 15 Mar 2018
5 answers
1.7K+ views
Do we have a way to turn all grid header verticaly?

I try:
$('#GroupeID' + GroupeId).find('.k-header').each(function () {
    $(this).css({
        'transform':'rotate(90deg)',
        '-moz-transform':'rotate(90deg)',
        '-o-transform':'rotate(90deg)',
        '-webkit-transform':'rotate(90deg)',
        '-ms-transform':'rotate(90deg)'
    });
});
 
$('#GroupeID' + GroupeId).find('.k-grid-header').css('height', '300px');
But that not give the exepected result.
thanks
Stefan
Telerik team
 answered on 15 Mar 2018
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?