telerik-mvc

how to create row rapidly - Telerik Kendo UI MVC grid pop-up mode

感情迁移 提交于 2020-01-16 15:46:14
问题 I have a grid similiar that. But I don't want to close pop-up window; after clicking update button, i want to save record and clear all (or some) fields and continue to create (other) new record. So user can re-insert new record rapidly (multiple insert in the same window). Finally user click the "cancel" (or close) button and popup will be closed. How can I do that. 回答1: Subscribe to Grid Edit/Save javascript events and follow the example below var _PreventWindowClose = false; var

Multiple filters in Kendo Combobox

匆匆过客 提交于 2020-01-15 07:06:07
问题 I have seen several examples where either the FilterType.StartsWith or FilterType.Contains is used as the filter. @(Html.Kendo().ComboBox().Name("kcombobox") .HtmlAttributes(new { style = "width:250px" }) .Placeholder("Select a value...") .DataTextField("Text") .DataValueField("Value") .Filter(FilterType.StartsWith) .DataSource(source => { source.Read(read => { read.Action("GetCountries", "Home"); }).ServerFiltering(true); }) ) How to use multiple filters together. I want to filter the data

Multiple filters in Kendo Combobox

人走茶凉 提交于 2020-01-15 07:05:04
问题 I have seen several examples where either the FilterType.StartsWith or FilterType.Contains is used as the filter. @(Html.Kendo().ComboBox().Name("kcombobox") .HtmlAttributes(new { style = "width:250px" }) .Placeholder("Select a value...") .DataTextField("Text") .DataValueField("Value") .Filter(FilterType.StartsWith) .DataSource(source => { source.Read(read => { read.Action("GetCountries", "Home"); }).ServerFiltering(true); }) ) How to use multiple filters together. I want to filter the data

How to send IEnumerable list from Ajax to Controller

十年热恋 提交于 2020-01-13 05:02:33
问题 I have a web application in MVC3 and i'm using Telerik Grid Batch Editing. Batch Editing have save changes button which returns UPDATED COLUMNS to controller IEnumerable list like [GridAction] public ActionResult Update(IEnumerable<Customers> updated) { ///user codes } but how to collect updated rows and make array send like IEnumerable list from Javascript with ajax to Controller ? EDIT I'm putting my view png I just want to send updated rows data to Controller and Save Changes button can do

Telerik grid not rendering dropdownlist in column MVC3

僤鯓⒐⒋嵵緔 提交于 2020-01-03 06:05:09
问题 I have a problem with the Telerik grid that I can't seem to find quite the exact problem anywhere. I'm following the demo from their site for Client Side Edit Templates. When going into edit mode it immediately dies saying select method is undefined from this js statement: <script type="text/javascript"> function onEdit(e) { $(e.form).find('#PageList').data('tDropDownList').select(function (dataItem) { return dataItem.Text == e.dataItem['PageName']; }); } </script> Here is my view: <%@

Difference between Kendo UI Web and Kendo UI ASP.NET for MVC

会有一股神秘感。 提交于 2020-01-01 05:24:21
问题 When creating an MVC project via Visual Studio, Views are created with ".cshtml" files. The KendoUI Server Wrappers have a model in the View whereas the KendoUI Web not only doesn't have any model, but there is no ".cshtml" files; only HTML. The HTML seems to just point to a datasource for data retrieival/updates whereas the KendoUI Server Wrappers need a model to pass to a controller for the same type of operations. What is the difference between the two? I just don't understand the KendoUI

Telerik MVC Grid with Ajax Binding using EntityObjects gets Circular References exception

三世轮回 提交于 2020-01-01 00:21:24
问题 I have been using Telerik MVC Grid for quite a while now and It is a great control, however, one annoying thing keeps showing up related to using the grid with Ajax Binding to objects created and returned from the Entity Framework. Entity objects have circular references, and when you return an IEnumerable from an Ajax callback it generates an exception from the JavascriptSerializer if there are circular references. This happens because the MVC Grid uses a JsonResult which in turn uses

Telerik MVC Grid - problem with nullable DateTime property

一曲冷凌霜 提交于 2019-12-30 10:35:31
问题 I am reasonably new to Telerik MVC extensions. I have implemented my first instance in a view successfully. I am not implementing my second view using the Telerik MVC Grid, however the class that is being bound to the grid has 2 columns which are of type Nullable. When I run my code, the view spits out an error as follows: The model item passed into the dictionary is null, but this dictionary requires a non-null model item of type 'System.DateTime'. I originally thought this might be a

How to bind images in Telerik Grid for ASP.NET MVC

柔情痞子 提交于 2019-12-25 07:49:13
问题 Please let me know how to bind a image static image with all rows in Telerik Grid for ASP.NET MVC. <%= Html.Telerik().Grid(Model.SearchResponse) .Name("SearchGrid") .Columns(columns => { //Here i need to bind a static image column// columns.Bound(grid => grid.Name); columns.Bound(grid => grid.CaseNumber); }) .Pageable(true) %> 回答1: This is possible by adding another templated column to your collection: Using ASPX columns.Template(c => { %><img alt="Static Image Alt Text" src="<%= Url.Content(

Telerik Combo Background

大兔子大兔子 提交于 2019-12-25 02:38:21
问题 How can i Change background color of specific values in telerik Combo (MVC). <%= Html.Telerik().ComboBox() .Name("DropDownList") .BindTo(new SelectList(Model, "ID", "NAME")) .Filterable(filtering => { filtering.FilterMode(AutoCompleteFilterMode.Contains); }) .HtmlAttributes(new { }) %> 回答1: function onDataBaound(e) { var combobox = $(this).data('tComboBox'); var str = '<%:Html.Raw(Json.Encode(ViewData["Values"]))%>'; str = str.replace(/[\[\]']+/g, ''); str = str.split(','); var j = 0; if