My custom validation isn't working so modified a demo in the dojo and it didn't work as well.
01.<!DOCTYPE html>02.<html>03.<head>04. <meta charset="utf-8">05. <title>Kendo UI Snippet</title>06. 07. <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.common.min.css">08. <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.rtl.min.css">09. <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.default.min.css">10. <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.dataviz.min.css">11. <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.dataviz.default.min.css">12. <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.mobile.all.min.css">13. 14. <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>15. <script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.all.min.js"></script>16.</head>17.<body>18. 19.<div id="myform" data-name="my-form">20. First <input name="firstname" /> Last <input name="lastname" /> <br /><br/>21. <button id="save">Save</button> <button id="reset">Reset</button>22. <div id="errors"></div>23. <div id="user"></div>24.</div>25. 26.<script>27. // attach a validator to the container and get a reference28. //var validatable = $("#myform").kendoValidator().data("kendoValidator");29. $("[data-name=my-form]").kendoValidator({30. rules: {31. validName: function (input) {32. if (input.is('[name=lastname]') || input.is('[name=firstname]')) {33. var first = $('[name=firstname]').val();34. var last = $('[name=lastname]').val();35. 36. return !(first === "" && last === "");37. }38. return true;39. }40. }41. , messages: {42. validName: "First or Last name is required."43. }44. });45. $("#save").click(function() {46. var form = $("[data-name=my-form]");47. var validatable = form.kendoValidator().data("kendoValidator");48. //validate the input elements and check if there are any errors49. if (validatable.validate() === false) {50. // get the errors and write them out to the "errors" html container51. var errors = validatable.errors();52. $(errors).each(function() {53. $("#errors").html(this);54. });55. 56. }57. else{58. $("#errors").html(''); 59. $('#user').html($('[name=lastname]').val() +', '+ $('[name=firstname]').val());60. } 61. });62. 63. $('#reset').on('click',function(){ $('#user').html(''); $('input').val('');});64.</script>65.</body>66.</html>
Any ideas?
Hello. I'd like to know how to implement virtual scrolling for my ComboBox. I'm using OData for ComboBox's DataSource.
I've tried to use the example (https://demos.telerik.com/kendo-ui/combobox/virtualization) - however i'm stuck. I don't know how to implement a Value Mapper in my WebAPI. In this example it's easy to get the index of some value, which is not loaded yet, because there are no any filters/​ordering ​there. But in my case, i'm using the same OData method for different DataSources, but with different filters/ordering.
So, how can i get the index of some value, if i don't know which filter/ordering was used for the DataSource?
I am using JSON as local data for 3 cascading dropdownlists
– the JSON is hierarchical by group->category->subcategory. The JSON
looks like this (neat and hierarchical):
01.{02. "Groups": [03. {04. "Group": "Grp 1",05. "Categories": [06. {07. "Category": "Cat 1",08. "Subcategories": [09. { "Subcategory": "Subcat 1" },10. { "Subcategory": "Subcat 2" }11. ]12. },13. {14. "Category": "Cat 2",15. "Subcategories": [16. { "Subcategory": "Subcat 3" },17. { "Subcategory": "Subcat 4" }18. ]19. }20. ]21. },22. {23. "Group": "Grp 2",24. "Categories": [25. {26. "Category": "Cat 3",27. "Subcategories": [28. { "Subcategory": "Subcat 5" },29. { "Subcategory": "Subcat 6" }30. ]31. },32. {33. "Category": "Cat 4",34. "Subcategories": [35. { "Subcategory": "Subcat 7" },36. { "Subcategory": "Subcat 8" }37. ]38. }39. ]40. }41. ]42.}
1.var dataSource = new kendo.data.DataSource({2. data: data.Groups3. });4.dataSource.read();Then I attempt to
cascade the dropdowns. I populate the group dropdown correctly, but just don’t
see how to filter the category and subcategory dropdowns based on the dropDown
that’s being cascaded from. I'm such a newb.
01.var groups = $("#groups").kendoDropDownList({02. optionLabel: "Select group...",03. dataTextField: "Group",04. dataValueField: "Group",05. dataSource: dataSource06.}).data("kendoDropDownList");07. 08.var categories = $("#categories").kendoDropDownList({09. cascadeFrom: "groups",10. optionLabel: "Select category...",11. dataTextField: "Category",12. dataValueField: "Category",13. dataSource: dataSource // HOW DO I FILTER THE DATASOURCE FOR CATEGORY OF GROUP?14.}).data("kendoDropDownList");15. 16.var subcategories = $("#subcategories").kendoDropDownList({17. cascadeFrom: "categories",18. optionLabel: "Select subcategory...",19. dataTextField: "Subcategory",20. dataValueField: "Subcategory",21. dataSource: dataSource // HOW DO I FILTER THE DATASOURCEFOR SUBCATEGORY OF CATEGORY?22.}).data("kendoDropDownList");I am working on a C# MVC (5.2.2) App using Kendo.MVC 2015.3.930.545 (VS 2013 .NET 4.5.1)
Obviously I would like to be able to refresh/update the scheduler when changing the date(s). I am not using the JSON-based functions as the demos use. For my other Telerik controls, the same holds true. That is, I use plain/vanilla server calls to the server instead. I do capture some events using JS and do make AJAX calls to refresh data where/when applicable. I would like to use this approach for the Scheduler but I need help w/this control.
In this case, I would like to know how I can capture the change of dates. I am not able to use the "Navigate" event nor .Data() for the .DataSource's .Read() method in my code (am I missing some lib? dll?):
Here is my Scheduler control in my .cshtml file:
@(Html.Kendo().Scheduler<EPIMS.Models.TaskViewModel>()
.Name("scheduler")
.Date(System.DateTime.Today)
.StartTime(new DateTime(System.DateTime.Now.Year,System.DateTime.Now.Month,System.DateTime.Now.Day, 5, 00, 00))
.Height(600)
.Views(views =>
{
views.DayView(dayView => dayView.Selected(true));
views.WorkWeekView();
views.WeekView();
views.MonthView();
})
.Timezone("Etc/UTC")
.DataSource(d => d
.ServerOperation(true)
.Read("Details", "Inspections").Data()
//.Read(read => read.Action("Details", "Inspections"))
.Create("Create", "Inspections")
.Destroy("Deactivate", "Inspections")
.Update("Edit", "Inspections")
.Events(e =>
{
e.Change("schedulerChange");
e.Navigate
})
)
.BindTo(Model)
)
The "Navigate" event is not available nor is the .Data() item for the .Read() method (for DataSource).
I get this error @ runtime for the .Data() item:
Compiler Error Message: CS1061: 'Kendo.Mvc.UI.Fluent.SchedulerAjaxDataSourceBuilder<EPIMS.Models.TaskViewModel>' does not contain a definition for 'Data' and no extension method 'Data' accepting a first argument of type 'Kendo.Mvc.UI.Fluent.SchedulerAjaxDataSourceBuilder<EPIMS.Models.TaskViewModel>' could be found (are you missing a using directive or an assembly reference?)
and this error @ runtime for the e.Navigate event:
Compiler Error Message: CS1061: 'Kendo.Mvc.UI.Fluent.DataSourceEventBuilder' does not contain a definition for 'Navigate' and no extension method 'Navigate' accepting a first argument of type 'Kendo.Mvc.UI.Fluent.DataSourceEventBuilder' could be found (are you missing a using directive or an assembly reference?)
Am I using old API calls? How can I capture the change of dates?
Thanks,
​
Hi,
This is really urgent thing.
i am drawing a scatterLine chart with multi-axis series.I was following your example at http://dojo.telerik.com/oJUyE. My problem is when i have negative(-) values for x-axis, then y-axis will be overlapped. When it has all the x-values with positive values it shows 2 separate y-axis properly. see all-positive-X-values.png image.
But when i have negative x-values, it doesn't show y-axis properly. see with-negative-X-values.png image.
i know there is a property called axisCrossingValue under xAxis, but i still can't use that, because i have 6 different series( that means 6 different y-axis).
Please guide me how i solve this problem..
Thank you
Hello,
assume we a simple tree with items of type A, B and C. It is not possible to drop C into A. I know how cancel a drop - in drop event, just set valid to false. Is it possible to visualy show the user that he/she cannot drop an item of type C into an item of type A in the drag event? And is it possible to template the drag&drop icon while dragging it?
Thanks
Hi,
I'm trying to move the zero line up because the series circles are being drawn behind the category, and only half of a circle is being drawn. I need a space between the category section and the zero line.
So far I tried different combinations of min, max, margins and padding but I haven't found a way to easily separate the category axis from the zero line.
Adding a negative min value had no effect.
Thanks in advance!
[{"id":"50344","name":"Jane Doe"},{"id":"50562","name":"John Doe"}]
It is just a list of user names, and their user ids.
I want to grab the "id" field from this data when one of the users are selected from the dropdown list.
Is that possible?