kendo-ui

Kendo UI reference not working in Razor view

半腔热情 提交于 2019-12-04 23:55:16
I am trying to create a Telerik Grid view but when I go to reference kendo it does not recognize it. Visual Studio is giving me an error when I try to reference kendo. This is the code @(Html.Kendo().Grid) and below is the error. 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?) I have added a bundle in the BundleConfig file for both Scripts and Content. Also I have added @Scripts.Render

How to change view date dynamically (which is filter event by date time)

那年仲夏 提交于 2019-12-04 23:14:28
I Want to filter event by date but date is pass by normal input type="text" not kendo default datepicker.And display passing date in kendo schduler header But cant not change view date.This is my code......... $scope.searchEventByDate = function (item) { var scheduler = $("#scheduler").data("kendoScheduler"); scheduler.view().startDate(item.StartDate); scheduler.view().endDate(item.EndDate); scheduler.view(("day")); $scope.scheduler.dataSource.read(); }; This is my filter param parameterMap: function (options, operation) { var popupheight = $(window).height() - 180 + 'px'; $scope

Jquery validate hides kendo-ui controls

夙愿已清 提交于 2019-12-04 22:29:44
问题 I have a form which uses a kendo-ui numericTextBox @Html.LabelFor(p => p.Cost) @Html.TextBoxFor(p => p.Cost, new { @autocomplete = "off" }) I bind it, then, to make it work with jquery validate plugin, i set the following settings: $("#Cost").kendoNumericTextBox({ format: "c", min: 0, decimals: 2 }); $.validator.setDefaults({ ignore: [], highlight: function (element, errorClass) { element = $(element); if (element.hasClass("k-input")) { element.closest(".k-widget").addClass(errorClass); }

Using Kendo Grid in PartialView

最后都变了- 提交于 2019-12-04 21:05:47
I have two <section> in the Index view of my MVC application and I want to render two partial views in these sections. There is no problem rendering a Kendo grid to one Index. However, in order to render data on Kendo Grid, could I use the two methods returning Json in the controller as shown below. Could you give me an example how to achieve this? Controller: public ActionResult Index() { return View(); } public ActionResult Issues_Read([DataSourceRequest]DataSourceRequest request) { IQueryable<Issue> issues = db.Issues; DataSourceResult result = issues.ToDataSourceResult(request, c => new

How to compare and display kendo dirty flag upon editing only if the old value and new value are different before saving the grid

一个人想着一个人 提交于 2019-12-04 21:02:13
In a kendo grid, in grid cell when I change a value kendo's dirty flag is displayed. But then when I click back to the same grid cell and change it to the previous value (already existing value) the dirty flag still appears. How can I check whether the value is similar to the previous value and not display the dirty flag before saving. Below is my code for kendo editable dropdown. function editCategoryDropDown(container, options) { var catObject = JSON.parse(ticketProjectCategoryObject.value); $('<div id="categoryDDTreeView" class="dropDownTreeViewStyle"/>').appendTo(container); var

How to get AngularJS and KendoUI working in harmony?

﹥>﹥吖頭↗ 提交于 2019-12-04 20:45:33
In stages, I setup my .Net MVC solution and ensured both Angular JS and KendoUI are working independently. app.js: var app = angular.module("app", ['kendo.directives']); and in my controller, I have the following defined: app.controller('contentTypesController', ['$scope', '$log', 'contentTypesRepository', function ($scope, $log, contentTypesRepository) { var a = {}; $scope.status; $scope.contentTypes; $scope.contentTypeOptions; // for testing purposes, but not used - used for navigation properties $scope.users; getContentTypes(); function getContentTypes() { // call the data repository

Filtering a Kendo Grid on a custom object

痞子三分冷 提交于 2019-12-04 20:27:37
I have a Kendo Grid with a display template that is using a custom object. I've implemented IComparable to allow grouping and sorting, but I'm not sure what I need to do to get the filtering to work. As it is, when I click the Filter button for the column it has a blank dropdown instead of the usual 'Contains, starts with, equals' and such options that would normally show. I am using the ToDataSourceResult to manipulate the results. The model: public class LEAProgramMap { public string entity_program { get; set; } [UIHint("ProgramEditor")] public ProgramDDL program_desc { get; set; } } The

How to filter a Kendo UI MVC grid using a dropdown list

久未见 提交于 2019-12-04 19:05:50
I have a kendo grid that is filtered by pushing values from a dropdownlist into the built in kendo filters. I can search the grid using the same method when I type values in a textbox and search. This is my kendo grid and the dropdown @(Html.Kendo().DropDownListFor(model => model.MyObject.ID) .Name("Objects").DataTextField("Value").DataValueField("Key") .BindTo(@Model.MyObjectList).AutoBind(true) .HtmlAttributes(new { id = "selectedObject" }) <a class="button" onclick="searchGrid()" id="search">Search</a> @(Html.Kendo().Grid<MyViewModel>() .Name("MyGrid").HtmlAttributes(new { style = "

Kendo DropDownList Shows DataValueField Prior to DataTextField when Loading

青春壹個敷衍的年華 提交于 2019-12-04 18:22:56
The following code loads a Kendo DropDownList, but while the page renders it first shows the DataValueField prior to the DataTextField. It binds just fine to the DataTextField after a second, but I would not like to show the numeric value while it renders. Does anyone know of a way to make only the DataTextField value be shown and not the DataValueField for that first second while it renders? @(Html.Kendo().DropDownList() .Name("SomeName") .DataTextField("SomeTextField") .DataValueField("SomeValueField") .DataSource(source => { source.Read(read => { read.Url(Url.ExtensionMethodThatReturnsURL(

Conditional in Kendo grid column template

三世轮回 提交于 2019-12-04 17:13:39
问题 I need to apply a condition in my kendo grid column template. Here is my code: columns: [ { field: "EmpName", title: "Name", template: '<a href="\\#" onclick="showName();">#= if (empName == null){ "show xxx" } else { // I want to show actual name if it is not null empName } #</a>' }, 回答1: Check this '<a href="" onclick="showName();">'# if( empName==null) {#<span>show xxx<span># } else {#<span>#: empName#<span>#} #'</a>' 回答2: something like this should work for you: # if(test == null) { #