kendo-asp.net-mvc

Kendo UI Calendar Multiselection

旧城冷巷雨未停 提交于 2019-12-05 20:07:47
Hi is there a way to make the kendodatepicker allow multiselect? so select more than one date and have them all stay highlighted? Update 08.2016 You can use my plugin to select multiple dates. Demo Old answer Still there is no official way to select multiple dates in DatePicker. However, with some help of jQuery you can achieve this functionality. HTML: <table> <tr> <td style="vertical-align: initial; padding-right: 100px;"> <input id="picker" /> </td> <td> <div id="calendar"></div> </td> </tr> </table> CSS: .k-state-selected { background-color: transparent; border-color: transparent;

How can I force Kendo Grid to use a numeric filter on a column

爱⌒轻易说出口 提交于 2019-12-05 19:36:47
Using the following code, Kendo Grid uses the string filter interface for t.Files.Count even though the type is an int . How can I force the grid to use the numeric filter UI instead? @(Html.Kendo().Grid<GJW_Site.Web.Models.TargetsModel>() .Name("grid") .Columns(columns => { columns.Bound(t => t.ID).Width(80); columns.Bound(t => t.OrbitalPeriod); columns.Bound(t => t.Files.Count); }) .Sortable() .Filterable() .DataSource(dataSource => dataSource.Ajax() .PageSize(20) .Read(read => read.Action("Targets_Read", "Targets")) ) .Resizable(o => o.Columns(true)) .ColumnMenu() ) Produces a filter menu

Kendo grid Insert new record on the last page, last row position

左心房为你撑大大i 提交于 2019-12-05 16:56:32
I'm using kendo grid in inline GridEditMode and GridInsertRowPosition set to bottom. Ajax is used for the data binding. Sorting is enabled and sorted by DateTime field. Page size is set to 10. To problem occur when there are multiple pages (more that 10 records). I have a javascript function that jumps to the last page and show new row at the bottom. But on some point sort event is triggered, and grid moves to read only mode. Is there a possibility to prevent Grid sorting only for the case when new row is added? Any help is welcome. Thank you! You should define a custom command in your toolbar

How to send data to the controller from the Kendo UI TreeView

ぐ巨炮叔叔 提交于 2019-12-05 06:55:39
问题 I have two TreeViews, one has a list of countries, and the other is empty, now I want drag and drop selected countries into the second tree-view. I don't know how to send data to the controller from the TreeView and there is also some text field on the page in a form. So, how can I send both the form data and the TreeView's data to the controller. Here is the code for the second tree-view which is empty and I want to add the selected nodes to: @(Html.Kendo().TreeView() .Name("treeview-right")

Kendo ListView: cant refresh (reload) data

◇◆丶佛笑我妖孽 提交于 2019-12-05 04:46:39
Here is my ListView: @(Html.Kendo().ListView<Entity>() .Name("listView") .TagName("div") .ClientTemplateId("template") .DataSource(dataSource => { dataSource.Read(read => read.Action("Products_Read", "Home").Data("additionalData")); dataSource.PageSize(4); }) .Pageable() ) Here are javascript function that must reload data: var someData = "-1"; function reload() { // insure that function exists // alert( $("#listView").data("kendoListView").refresh) $("#listView").data("kendoListView").refresh(); } function additionalData() { return { someData: someData }; } I do all as written in

Kendo ASP.NET MVC helper Grid generic class

本小妞迷上赌 提交于 2019-12-04 23:56:52
问题 I have the following dilemma: I am trying to make a Kendo UI Grid inside a partial View that will be used with different types of objects and that can support actions such as Delete or Create. The object looks like this: public class GridViewModel { public Type ObjectType { get; set; } public IEnumerable<object> Items { get; set; } public GridViewModel(Type type, IEnumerable<object> items) { Items = items; ObjectType = type; } } ObjectType is a variable of type Type that retains the type of a

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 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 = "

Binding date value to ng-model in angular kendo date picker

匆匆过客 提交于 2019-12-04 11:32:15
问题 I have an api which return the date in this format "014-08-26T15:10:45.402Z" i am using angular kendo ui .The problem i am facing is the date is not getting bound to the kendo date picker.Could someone help me out . <input kendo-date-picker ng-model="emp.datestart" k-format="MM/dd/yyyy" /> 回答1: In order to have the Kendo DatePicker working with a string date value model you need: 1) Use k-ng-model instead of ng-model. 2) Tell the widget in which exact format the date will be parsed. <input

Kendo dropdown width

こ雲淡風輕ζ 提交于 2019-12-04 10:26:42
问题 Hi can someone tell me how to set width for kendo dropdown? Here is my code sample and it is not working. Anything wrong in that? $("#div1").kendoDropDownList({ dataSource: items, dataTextField: "Name", dataValueField: "Id", Width : "250px" }); 回答1: The kendoDropDownList does not have a property width for it's configuration. See here: Kendo Docs What you can do, is styling the correct class. Since you hopefully do know where your dropdown lies, you can specify the selector so it doesn't apply