kendo-asp.net-mvc

Handling events from a Kendo MVC Grid's PopUp editor window

坚强是说给别人听的谎言 提交于 2019-12-02 03:43:44
I have a Kendo MVC grid that I am creating with the Html.Kendo().Grid helper. When the PopUp editor window opens, I want to catch the event and run a bit of javascript. When I configure a normal kendo window with .Events, the events fire properly and my function runs. However, when I code the .Events property on the .Editable.Window of the grid, the events do not fire. @(Html.Kendo().Grid<FooRecord>() .Name("cFooGrid") .Columns(c => { c.Bound(f => f.Foo); c.Bound(f => f.Bar); c.Bound(f => f.Bas); c.Command(a => a.Edit()); }) .Editable(e => e .Mode(GridEditMode.PopUp) .Window(w => w.Events(v =>

Unable to bind data to Kendo Scheduler

匆匆过客 提交于 2019-12-02 03:40:10
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 ActionResult GetScheduleInspections([DataSourceRequest]DataSourceRequest request) { ScheduleInspectionModel sim

Radio Button doesn't reflect Model's value

耗尽温柔 提交于 2019-12-01 22:16:59
I have a kendo Grid for a class, and for that class I've built an editor template to produce a radio button for one of the fields. This radio button doesn't reflect propertie's value and is always false , although I've checked the value, by printing it on the form, and I'm sure it's true . If I set a default value for that field, the radio button will reflect that value, regardless of the real value of the field. I should note that I'm using a client template to display a text for that field, and it works fine. This is the Grid: @(Html.Kendo().Grid<Class>() .Name("Grid") .Columns(columns => {

how to set LoadContentFrom kendo window in run time

馋奶兔 提交于 2019-12-01 14:24:51
i'm starter in kendo ui, i want use kendoUi window but i have some problem for use i write this code for create window @(Html.Kendo().Window().Name("Details") .Title("Customer Details") .Visible(false) .Modal(true) .Draggable(true) .Width(300) ) in page i have some button , i want when user click in one of this button set LoadContentFrom dynamically with jquery. But I do not know how to do it. please help me. thanks all. you can try this $("#youbuttonID").bind("click", function() { $("#Details").data("kendoWindow").open(); }); to load conent from use @(Html.Kendo().Window().Name("Details")

KendoUI DateTimePicker undefined on document.ready

我与影子孤独终老i 提交于 2019-12-01 09:17:38
I have a Kendo DateTimePicker control in an mvc (asp.net) partial view that I am trying to access from document.ready(): @(Html.Kendo().DateTimePickerFor(vvm => vvm.StartTime) .Name("dtpVisitStart") .Format("yyyy/MM/dd HH:mm tt") .TimeFormat("HH:mm:tt") .Events(e => e.Change("dtpVisitStart_Change") ) ) The javascript: $(document).ready(function () { TestDTP(); }); function TestDTP() { var dtp = $("#dtpVisitStart").getKendoDateTimePicker(); debugger; } When the debugger line runs dtp is undefined. How can I initialize this date time picker when the partial view loads? Your original approach

$(document).ready(function () $ is not defined [duplicate]

落爺英雄遲暮 提交于 2019-12-01 07:26:35
问题 This question already has answers here : JQuery - $ is not defined (31 answers) Closed 3 years ago . I'm working on asp.net mvc and using Kendo UI grid control for data retrieving, using these functionality for another application working fine problem not in code. All JavaScript and Kendo grid ui reference including when i run the application i face these error $(document).ready(function () $ is not defined List:178 Uncaught TypeError: $(...).kendoDatePicker is not a function multiple time.

MVC bundeling : Err 403

我的梦境 提交于 2019-12-01 03:04:06
Using VS'12, Asp.net - C# - InternetApplication Template, KendoUI, EF Code First This is my MVC BundleConfig.cs bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css")); // The Kendo CSS bundle bundles.Add(new StyleBundle("~/Content/kendo").Include( "~/Content/kendo/kendo.common.*", "~/Content/kendo/kendo.default.*")); // The Kendo JavaScript bundle// or kendo.all.min.js if you want to use Kendo UI Web and Kendo UI DataViz bundles.Add(new ScriptBundle("~/bundles/kendo").Include( "~

How to handle a Kendo UI Grid row double-click event

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 09:04:18
I have a selectable KendoUI grid in my MVC app. I want to do something when the user double-clicks on the grid. I don't see a double-click event for the grid. How may I handle the double-click event when there is none exposed? EfrainReyes Use the standard double click event. The first click will select the grid row, adding a .k-state-selected class to it, and the second click will trigger the double click event. $("#yourgridname").on("dblclick", "tr.k-state-selected", function () { // insert code here }); You can also use dataBound dataBound: function (e) { var grid = this; grid.tbody.find("tr

Get a reference to Kendo Grid from inside the error handler

眉间皱痕 提交于 2019-11-30 08:48:43
There already are questions how to get custom error handling, with answers , but all those answers use 'external' reference/selector to the grid to make it work, for example: function onError(e) { if (e.errors) { var message = "Error:\n"; var grid = $('#gridID').data('kendoGrid'); // <<- here (...) } Is it possible to get the reference to the grid from inside the error handling function without providing the selector by hand or 'externally' (because global variables are meh )? That way the error handling script could be totally self-contained. Patryk Ćwiek Version 'current' as of 2015-12-05

Kendo grid image column

我怕爱的太早我们不能终老 提交于 2019-11-30 08:31:33
问题 working on a MVC4 project, I'm trying to add a column to my kendo grid that displays an image. <div id="datagrid"> @(Html.Kendo().Grid<SustIMS.Models.ConcessionModel>() .Name("datagrid_Concessions") .Columns(columns => { columns.Bound(c => c.Code).Title(ViewBag.lblCode); columns.Bound(c => c.Description).Title(ViewBag.lblDescription); columns.Template(@<text> <img src='@item.Image' /> </text> ).Title("Image"); }) I've tried that but no luck. Also tried: columns.Template(@<text> <img src='../.