kendo-ui

Why doesn't my KendoGrid call my MVC controller?

此生再无相见时 提交于 2019-12-01 11:41:08
I have the following code in a standard C# ASP.NET MVC controller. public JsonResult ReadTeachers() { return Json(ReadTeacherData(), JsonRequestBehavior.AllowGet); } public void UpdateTeachers(IEnumerable<Teacher> updatedTeachers) { // this is never called } I'm trying to call this controller with a KendoGrid. Here is the code for my grid. $("#teachers").kendoGrid({ dataSource: { type: "json", transport: { read: { url: '@Url.Action("ReadTeachers", "EducationPortal")', dataType: "json" }, update: { url: '@Url.Action("UpdateTeachers", "EducationPortal")', dataType: "json" }, parameterMap:

Kendo Ui Grid not rebinding after search button click

有些话、适合烂在心里 提交于 2019-12-01 11:32:59
I having difficulty where the Kendo Ui grid would not rebind with new result after the Search button click.Please let me know how i could achieve this. Thank you Currently the GetList will return data correctly however the KendoUi grid would not rebind with the new result. .cshtml <div id="search"> <div> <div class="searchOption"> @Html.LabelFor(model => model.HRN) @Html.EditorFor(model => model.HRN) </div> </div> <div> <div class="smallBox"> <input type="button" id="btnSearch" style="height:32px; font-size:14px; background-color:#3399FF" class="k-button" title="Search" value="Search" /> </div

Changing Angular model to update Kendo

杀马特。学长 韩版系。学妹 提交于 2019-12-01 11:28:51
I've been using Angular for a project and just recently found out about the Kendo-Angular project over at http://kendo-labs.github.io/angular-kendo/#/ . I was successful in adding Angular-Kendo into my project and it's working like I think it should with the exception of updating models like I'm used to. This project is exactly what I am looking for, however, no examples in the documentation actually show you being able to update an Angular model so it updates a Kendo data source. Here is a piece of code for example: $scope.data = new kendo.data.DataSource({ data: [{ name: "India", data: [10,

Kendo DataSource: How to define “Computed” Properties for data read from remote odata source

二次信任 提交于 2019-12-01 11:13:08
Situation: kendo DataSource var ordersDataSource = new kendo.data.DataSource({ type: "odata", transport: { read: { url: "http://localhost/odata.svc/Orders?$expand=OrderDetails" } }, schema: { type: "json", data: function(response){ return response.value; } total: function(response){ return response['odata.count']; } }, serverPaging: true, serverFiltering: true, serverSorting: true }) the json data read from the odata source is like: { odata.metadata: "xxxx", odata.count: "5", value: [ { OrderId: 1, OrderedDate: "2013-02-20", OrderInfoA: "Info A", OrderInfoB: "Info B" OrderDetails: [ {

Method parameter with (attribute) in brackets

筅森魡賤 提交于 2019-12-01 10:36:46
I have a code example from KendoUI. public ActionResult Customers_Read([DataSourceRequest]DataSourceRequest request) { return Json(GetCustomers().ToDataSourceResult(request)); } private static IEnumerable<CustomerViewModel> GetCustomers() { var northwind = new SampleEntities(); return northwind.Customers.Select(customer => new CustomerViewModel { CustomerID = customer.CustomerID, CompanyName = customer.CompanyName, ContactName = customer.ContactName, // ... }); } This example works fine. I am confused about [DataSourceRequest] in Customers_Read method... When I remove (the Attribute?)

Kendo DatePickerFor issue in CHROME version 56.0.2924

。_饼干妹妹 提交于 2019-12-01 09:43:22
I am using Kendo DatePickerFor . After I recently updated my chrome browser, it shows blank value in date picker control. I am using it for month selection with MMM yyyy format. Can anybody please help me out? P.S. - My previous chrome version was 55.0.2883 and it was working perfectly fine. My code in view file is: @(Html.Kendo().DatePickerFor(m => m.FromDate).Start(CalendarView.Year).Depth(CalendarView.Year).Format("MMM yyyy")) ceciliaSHARP This fixed the problem for me: http://www.telerik.com/forums/date-field-not-rendering-correct-in-browsers-that-support-html-5 Some browsers with native

Kendo UI copying data through controls

邮差的信 提交于 2019-12-01 09:40:37
Is it possible to take 2 separate Kendo UI grids and be able to pass data back and forth through UI controls (like forward and backward arrows)? The pattern would would be to take the master list on the left, select items and have a refined list on the right. OnaBai If is possible and it is not hard to do but you have to do it by yourself so you need: Some knowledge on KendoUI Grid and DataSource and the events that they expose. Some knowledge on JavaScript + jQuery that help you with the validations and avoiding errors. Lets have the following grid definitions: var grid1 = $("#grid1")

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

Kendo Ui Grid not rebinding after search button click

孤者浪人 提交于 2019-12-01 08:49:12
问题 I having difficulty where the Kendo Ui grid would not rebind with new result after the Search button click.Please let me know how i could achieve this. Thank you Currently the GetList will return data correctly however the KendoUi grid would not rebind with the new result. .cshtml <div id="search"> <div> <div class="searchOption"> @Html.LabelFor(model => model.HRN) @Html.EditorFor(model => model.HRN) </div> </div> <div> <div class="smallBox"> <input type="button" id="btnSearch" style="height

Customize the data in Kendo Grid pdf export

北慕城南 提交于 2019-12-01 08:40:45
I am using the built in functionality of Kendo Grid to export the grid data in pdf and excel http://demos.telerik.com/kendo-ui/grid/pdf-export . It is working fine for me. I want to customize the data that is exported i.e. add some additional columns and remove some of the columns of grid. Is there any way to customize the export data using templates or some other feature. Thanks in advance. You have two options: Define a second grid with the columns that you want to export to PDF and when asked to export actually export the second. Both grids should share the datasource so filtering, orders..