Telerik Forums
Kendo UI for jQuery Forum
11 answers
342 views
Reference this demo: http://demos.kendoui.com/web/mvvm/elements.html

Okay so when a checkbox is checked, the array gets updated right...

Then when the array changes, I need to fire off a callback to a service, AND update the checkbox by adding\removing a class.

What seems to happen is that the click event fires first, so the callback doesn't send back the proper values from the array (like I'm always one selected value behind).

?

Steve
Veselin Tsvetanov
Telerik team
 answered on 07 May 2019
2 answers
148 views

Hello,

I encountered strange behaviour of kendo ui tooltip in Chrome.

Steps to reproduce:

  1. use Chrome (version 73.0.3683.103)  to go to tooltip demo https://demos.telerik.com/kendo-ui/tooltip/index
  2. set focus to document (click on page)
  3. move mouse pointer pixel by pixel to upper/center border of any of the yellow dots (that are showing tooltip)

=> if you hit the border tooltip starts appearing and disappering forever

 

Regards

Dirk

Dirk
Top achievements
Rank 1
 answered on 07 May 2019
6 answers
841 views

Just wondering if this is something wrong that I am doing, intended mechanics or a bug. 

 

See dojo: https://dojo.telerik.com/EfAQemOn

 

If you change the state of the "switch" it does not register that the underlying value has been changed and maintains the previous recorded value. If you interact with the view model via the checkbox it is recording the change state.

Is this something that is easy to fix without having to check the state value via the onchange event which currently seems to be the way you are testing for the change state value? 

 

just incase I have copied the dojo code here for you as well. 

 

<!DOCTYPE html>
<html>
<head>
    <base href="https://demos.telerik.com/kendo-ui/switch/mvvm">
    <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
    <title></title>
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2019.1.115/styles/kendo.material-v2.min.css" />

    <script src="https://kendo.cdn.telerik.com/2019.1.115/js/jquery.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2019.1.115/js/kendo.all.min.js"></script>
    

    <link rel="stylesheet" href="../content/shared/styles/examples-offline.css">
    <script src="../content/shared/js/console.js"></script>
</head>
<body>
<div id="example">
    <div class="demo-section">
        <input data-role="switch"
               data-bind="enabled: isEnabled, visible: isVisible, checked: isChecked, events: { change: onChange }" />
    </div>

  <input type="checkbox" data-bind="checked: isChecked, events: { change: onChange }"/> Change switch state
  
  
    <div class="box">
        <h4>Console log</h4>
        <div class="console"></div>
    </div>
</div>

<style>
    .demo-section {
        text-align: center;
    }
</style>

<script>
    var viewModel = kendo.observable({
        isChecked: true,
        isEnabled: true,
        isVisible: true,
        onChange: function (e) {
            kendoConsole.log("event :: change (" + (e.checked ? "checked" : "unchecked") + ") \r\n calling Directly::" + viewModel.isChecked +"\r\nCalling Via Get Method:: " + viewModel.get('isChecked'));
        }
    });
    kendo.bind($("#example"), viewModel);
</script>


</body>
</html>

 

Joana
Telerik team
 answered on 07 May 2019
7 answers
463 views

Hi,

I am looking to make changes to the flow of editing recurrences. Is it possible to change the order of when to show the dialog for selecting whether to edit the current occurrence or the series, so it is shown after the edit dialog?

I am looking to do the following: Whenever an event is edited it is always the current instance that is shown. After changes have been made in the edit dialog, the user is shown the options of whether to apply the changes to the series or to the instance. Is this possible?

Also is it possible to add an option to the "edit recurrence" dialog? I want to add the option of changing only the current instance edited and future instances.

Veselin Tsvetanov
Telerik team
 answered on 06 May 2019
5 answers
299 views
Is there a way to extend the viewmodel similar to how we extend the class using partial?
For example, a ViewModel will be pre-defined by product team.
Customers can then extend the viewmodel if required to add additional validations in a custom js file or part of html.
Veselin Tsvetanov
Telerik team
 answered on 06 May 2019
1 answer
517 views

https://demos.telerik.com/kendo-ui/grid/detailtemplate

 

as above url: Grid / Detail template:

Actually, we have a kendo-grid: 10 master-items, and each master item has its detail.

 

Questions:

1.just one edit button outside the grid , could it edit total details of 10 master-items ? 

2.just one save button outside the grid, could it save total modified detail of 10 master-items? 

 

where to find the sample code or how to do?

thanks a lot 

Alex Hajigeorgieva
Telerik team
 answered on 03 May 2019
9 answers
2.0K+ views
*** SOLUTION FOUND (see EDIT below) ***

I have followed some of the examples for declaring my MVC controller method for use with the Upload component.  My upload handler declaration is as follows:

public ActionResult Upload(IEnumerable<HttpPostedFileBase> attachments, long inventoryID, long imageType)
{
}

I have set my Upload control to use Async.  However, whenever I try to upload a file, the attachments parameters is always passed null.

I have also tried:
  • Renaming attachments to files
  • Declaring IEnumerable<HttpPostedFileBase> as IEnumerable<HttpPostedFile>
  • Declaring the attachments parameter as both HttpPostedFileBase and HttpPostedFile (singular

I have written some JavaScript (as the Upload event) to pass the additional parameters (inventoryID and imageType) which are always passed successfully.

    function imageUploadUpload(e) {
        e.data = { inventoryID : @Model.InventoryID, imageType: imageType };
    }

I have tried removing the Upload event/handler to see if this makes a difference, but still have the same problem.

Any idea what is going on?

Thank you.

*** EDIT ***

I found the solution here.  The name of the Upload component must match the name of the parameter that holds the HttpPostedFileBase.  I had named my Upload component imageUpload.  When I renamed the parameter to imageUpload, it worked fine!


Petar
Telerik team
 answered on 02 May 2019
9 answers
2.0K+ views
Whilst trying to create a scheduler event, i am getting the following error:
Uncaught TypeError: Cannot read property 'getTimezoneOffset' of null.
From another post, the suggestion was made to use DateTime2(7) for both the Start and End Dates. I have that and the error still happening.
The actual event does get saved, but the event form stays open and i have to refresh the screen. All very messy. Any help would be appreciated.


Christophe
Top achievements
Rank 1
 answered on 02 May 2019
2 answers
213 views

I have a tag like this
<button data-bind="attr: { data-placeholder: Placeholder(512) }" />

Usually I trigger the change like this: model.trigger('change', { field: 'Placeholder'}) but this doesn't work in this case.

Could anyone help me?

Thanks!

Dimitar
Telerik team
 answered on 02 May 2019
6 answers
549 views

Hello,

I'm trying to do following thing: when user leaves the page with grid his current filters ang sortings are saved and applied the next time he visits the page (not the whole persisted state).

So I'm doing it like this:

    var savedFilters = localStorage["kendo-grid-filters"];
    if (savedFilters) {
      $("#grid").data("kendoGrid").dataSource.filter(JSON.parse(savedFilters));
    }
    var savedSort = localStorage["kendo-grid-sort"];
    if (savedSort) {
      $("#grid").data("kendoGrid").dataSource.sort(JSON.parse(savedSort));
    }
    window.onbeforeunload = function () {
      localStorage["kendo-grid-filters"] = kendo.stringify($("#grid").data("kendoGrid").dataSource.filter());
      localStorage["kendo-grid-sort"] = kendo.stringify($("#grid").data("kendoGrid").dataSource.sort());
      return;
    }

Everything is working fine except filter for Date columns. For example, i set filter "equal to 08.08.2018", it filters the column. Then I leave the page and filter stored in local cache is "{field: "BPStartDate", operator: "eq", value: "2018-08-07T21:00:00.000Z"}". Then I visit the page again and I see that filter is kinda applied (filter icon is highlighted and has correct value) but I can't see filtered data.

What is the problem?

I attached two screenshots to illustrate what I'm talking about.

Thanks.

Tsvetomir
Telerik team
 answered on 01 May 2019
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?