kendo-asp.net-mvc

Send Additional Parameter in Kendo Grid Read Action

大城市里の小女人 提交于 2019-12-03 05:03:34
I have a kendo Grid as follows. @(Html.Kendo().Grid<RevenueModel>() .Name("WeeklyRevenue") .Resizable(resizing => resizing.Columns(true)) .Columns(columns => { columns.Bound(p => p.Number).Width(100); columns.Bound(p => p.Type).Width(100); columns.Bound(p => p.Week1).Format("{0:c}"); columns.Bound(p => p.Week2).Format("{0:c}"); columns.Bound(p => p.Week3).Format("{0:c}"); columns.Bound(p => p.Week4).Format("{0:c}"); columns.Bound(p => p.Week5).Format("{0:c}"); columns.Bound(p => p.TotalRevenue).Format("{0:c}"); }) .Scrollable() .Events(events => events.Change("onChange").DataBound("onDataBound

Kendo Grid Edit InLine Custom Validation message e.g. for duplicate Names etc

假如想象 提交于 2019-12-02 20:57:45
I have an entity Location and I am using the Kendu UI Grid with InLine edit mode. The entity owns a property DisplayName , which is required and must not exist twice in the database. At the moment, it works to display the Required Validation message: And it also works to build up a method CustomValidateModel called in the LocationController Ajax InLine Create method, that checks if the Name is already existing in the database and adds then a ModelError . I catch this error then in the .Events(events => events.Error("onError")) via javascript and show then the message via javascript popup.

Format DateTime in Kendo UI Grid using asp.net MVC Wrapper

≯℡__Kan透↙ 提交于 2019-12-02 20:07:48
I want to build a Kendo UI Grid with format date dd//MM/yyyy. However, all questions that I found about this, it were resolved with code Format("{0:d}"); . So, I have tried like a code below: GridBoundColumnBuilder<TModel> builder = par.Bound(field.Name); switch (field.Type.Type) { case CType.Boolean: builder = builder.ClientTemplate(string.Format("<input type='checkbox' #= {0} ? checked='checked' : '' # disabled='disabled' ></input>", field.Name)); break; case CType.Datetime: builder = builder.Format("{0:d}"); break; case CType.Decimal: case CType.Double: builder = builder.Format("{0:0.00}");

Jquery Appended Content - Not Clickable

核能气质少年 提交于 2019-12-02 17:36:18
问题 I have the following JQ. It's basically adding a little icon that will allow for some inline editing when a list item is selected. However, I am unable to work with the jquery added content. I cant even log anything to console when I click my JQ added content. Is there something wrong with my code below? I can not add a fiddle, because I dont have a link to the Kendo UI libraries, that this list is using. <script> $(function () { $("#treeview-left li").click(function () { $("div#EditEntity")

Why kendo Ui -grid date is not sorting properly?

▼魔方 西西 提交于 2019-12-02 16:53:36
问题 value is ReinsDepositAmount ** output ** i have recently stucked with one of the application date sorting in kendo ui grid. In kendo grid , the column name is define like this Incoming value to ReinsDepositDate - Month,date,year format. 08-23-1991 Field name is ReinsDepositDate: { field: "ReinsDepositDate", type: "date", title: "Due Date",format: "{0:M/d/yyyy}", width: 100, filterable: { cell: { operator: "contains" } } }, When Sorting the date , its sorting based on first values 1/12/1994 23

Unable to bind data to Kendo Scheduler

眉间皱痕 提交于 2019-12-02 08:09:18
问题 I've got this Kendo Scheduler that is displayed in the View but without any data. The Scheduler on the View: @(Html.Kendo().Scheduler<ProjName.Models.ScheduleInspectionModel>() .Name("scheduler") .Views(views => { views.DayView(); views.WorkWeekView(); views.WeekView(); views.MonthView(mv => mv.Selected(true)); views.AgendaView(); }) .Timezone("Etc/UTC") .DataSource(d => d .Read("ControllerName", "GetScheduleInspections") ) ) The datasource invokes the controller method below: public

Jquery Appended Content - Not Clickable

戏子无情 提交于 2019-12-02 07:48:40
I have the following JQ. It's basically adding a little icon that will allow for some inline editing when a list item is selected. However, I am unable to work with the jquery added content. I cant even log anything to console when I click my JQ added content. Is there something wrong with my code below? I can not add a fiddle, because I dont have a link to the Kendo UI libraries, that this list is using. <script> $(function () { $("#treeview-left li").click(function () { $("div#EditEntity").remove(); $(this).find(".k-state-focused").append("<div id='EditEntity'>  <a href='#' id='EditWindow'

kendo chart call out message

非 Y 不嫁゛ 提交于 2019-12-02 06:42:32
问题 I have a kendo line chart which will bind the data from Model as below. Now i would like to show at particular point a call out message saying degradation start at this point dynamically. Can some one help me on this how to acheive this. <div style="overflow:scroll;width:100%"> @if (@Model != null && @Model.XYAxisData != null) { @(Html.Kendo().Chart() .Name("Predictionchart") .Transitions(false) .RenderAs(RenderingMode.Canvas) //.Title(Model.YString + " Vs " + Model.XString + " Relationship")

Kendo datepicker acting weired for different computers on two different timezone

牧云@^-^@ 提交于 2019-12-02 05:46:19
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" culture="en-GB" /> </system.web> My computer's date format and settings are as follows; Region & Language

Kendo Grid hierarchy passing ID from master grid

旧城冷巷雨未停 提交于 2019-12-02 04:16:51
I have a Kendo Hierarchial Grid where the master grid contains the Client details and the sub grid contains the Point of Contacts . I am able to pass the Client ID from the master grid into the sub grid Read action and the data is loading fine. However, the issue comes while passing the Client ID into a Add New Point of Contact button in the sub grid. If I hard-code the value the Controller method runs fine. However, it is unable to pick the reference Client ID . The sub grid is as follows: <script id="template" type="text/kendo-tmpl"> @(Html.Kendo().Grid<Track24.Billing.Web.Models