kendo-asp.net-mvc

Kendo UI Grid - Show row number

半世苍凉 提交于 2020-01-03 18:35:15
问题 How do I show the row number in a Kendo UI Grid? The code I have is not working. The page displays the column but it's empty. @{int counter = 1;} @(Html.Kendo().Grid<QueueViewModel>() .Name("Queue") .Columns(columns => { columns.Template(@<text><span>@counter @{ counter++; }</span></text>).Title("#"); }) .DataSource(dataSource => dataSource .Ajax() .PageSize(10) .Read(read => read.Action("GetOpenQueue", "DataSource", new { GeneralQueue = true }) )) 回答1: Do this: @{ int counter = 1; } @(Html

MVC helper inside a template

谁都会走 提交于 2020-01-03 16:55:24
问题 I am trying to use a kendo MVC helper inside a template (remote template file loaded like: http://docs.kendoui.com/howto/load-templates-external-files#remote-templates. I have a controller that sends to the client the generated markup) My template file is something like: <script id="my-pager-template" type="text/x-kendo-template"> My pager @(Html.Kendo().ListView<Business.Data.MyPage>() .Name("myPagerListView") .TagName("div") .ClientTemplateId("my-pager-item-template") .DataSource(dataSource

how to Change Caption of popup kendo grid by html helper in add window

妖精的绣舞 提交于 2020-01-03 11:45:27
问题 I am using the popup kendo grid and i use add new record and edit mode and i want change caption of popup window kendo grid by html helper when i add new record. <div class="k-rtl"> @(Html.Kendo().Grid<KendoSample.Models.Person>() .Name("grid") .Columns(columns => { columns.Bound(p => p.PersonId).Title("Person Code").Width(100).Sortable(true); columns.Bound(p => p.Name).Title("Name").Width(200).Sortable(true); columns.Bound(p => p.Family).Title("Family").Sortable(false); columns.Command(c =>

How to disable events in Kendo UI scheduler?I just to make it read only

筅森魡賤 提交于 2020-01-02 04:12:16
问题 How to disable the event in kendo UI scheduler?I study the example from the official website examples,and see all of the cell in event have double click event to create and delete and other events,but now I just use it to show the result,so how to prevent all the create,delete,edit events? 回答1: Use the editable configuration option: $("#scheduler").kendoScheduler({ date: new Date("2013/6/6"), dataSource: [ { start: new Date("2013/6/6 08:00 AM"), end: new Date("2013/6/6 09:00 AM"), title:

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

夙愿已清 提交于 2020-01-01 19:27:22
问题 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=

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

落花浮王杯 提交于 2020-01-01 19:27:08
问题 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=

Kendo UI Datasource - Filter on releated data

空扰寡人 提交于 2020-01-01 17:02:28
问题 I am having trouble filtering a kendo data source on related data (many to many). I am using ASP.NET WebAPI2 and DataSourceRequest to catch the request on the server. The data is then fetched using the .ToDataSourceResult() extension method on an IQueryable. I am aware of this article http://blogs.telerik.com/kendoui/posts/12-11-29/the_facts_on_using_kendo_ui_with_asp_net_webapi My Data is structured as follows:- Customer -> CustomerAddress -> Address Where CustomerAddress is the join table

Kendo datepicker acting weired for different computers on two different timezone

China☆狼群 提交于 2019-12-31 04:55:14
问题 Hi we use a simple kendo datepicker for our web application. $("#DateInput").kendoDatePicker({ format: "dd/MM/yyyy", culture: "en-GB", max: new Date() }); Now when we try to get the datepicker value in Javascript my browser gives me date format dd/MM/yyyy but my colleague's browser gives him MM/dd/yyyy . We have tried to use same culture as you can see in kendo and as well as in our web.config we have put the globalization settings as follows. <system.web> <globalization uiCulture="en-GB"

How to add Kendo UI HTML helpers to my ASP.net MVC 4 project?

血红的双手。 提交于 2019-12-30 10:26:22
问题 Simple question: I've installed Telerik DevCraft Ultimate on my workstation. I've looked at the examples showing the use of the Kendo UI HTML helpers. What reference do I add to my project to be able to use them? 回答1: Configure your ASP.NET MVC layout page to include the Kendo UI Web JavaScript and CSS files: <link rel="stylesheet" href="@Url.Content("~/Content/kendo.common.min.css")"> <link rel="stylesheet" href="@Url.Content("~/Content/kendo.default.min.css")"> <script src="@Url.Content("~

Javascript runtime error: “object doesn't support property or method” in Internet Explorer

天大地大妈咪最大 提交于 2019-12-29 08:26:29
问题 I'm using kendo grids and they work fine for the CRUD operations. Now, I wanted to add filtering by adding the .Filterable() option to the grid's specification. Here's some code: <div id="datagrid"> @(Html.Kendo().Grid<SustIMS.Models.ConcessionModel>() .Name("datagrid_Concessions") .Columns(columns => { columns.Bound(c => c.Code).Title("Code"); columns.Bound(c => c.Description).Title("Description"); columns.Bound(c => c.TrafficOpeningDate).Title("Traffic Opening Date"); columns.Bound(c => c