telerik-mvc

When grid enters edit mode DateTime picker clears value

为君一笑 提交于 2019-12-12 13:17:14
问题 I have a DateTime field bound to a grid. When the grid enters edit mode the date/time picker displays, but the value is cleared from it. This forces the user to re enter the date/time. Any idea why it value is cleared when the edit mode is triggered? @(Html.Telerik().Grid<ExpenseGridModel>() .DataBinding(dataBinding => dataBinding.Ajax() .Select("ExpenseAjaxBinding", "ExpenseEntry") .Update("ExpenseUpdate", "ExpenseEntry") ) .Name("ExpensesGrid") .DataKeys(keys => keys.Add(r => r.id))

Using Telerik MVC grid, editing row blanks TimePicker and DateTimePicker

元气小坏坏 提交于 2019-12-12 03:26:36
问题 I have a Telerik grid populated by an Ajax command similar to the following: PowerStatusGrid.cshtml @{Html.Telerik().Grid(Model) .Name("PowerStatusGrid") .DataKeys(k => k.Add(o => o.StatusItemId)) .Columns(columns => { columns.Bound(o => o.ItemName).Title("Name").Width(250).ReadOnly(true); columns.Bound(o => o.DateTimePicker).Title("Date/Time").Width(150); columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.BareImage).HtmlAttributes(new { @class = "grid-edit-button" })

Problems with rendering a templated asp.net mvc telerik grid

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 02:36:38
问题 I have a problem with rendering a mvc telerik template grid control. Every thing seems fine but I have this error: Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1002: ; expected Description: An error occurred during the compilation of a resource required to service this request. Please review the

Telerik MVC Grid filterBy not working

此生再无相见时 提交于 2019-12-11 22:09:50
问题 I am facing a similar problem to this question has anybody found a solution to it http://www.telerik.com/community/forums/aspnet-mvc/grid/grid-does-not-filter-when-filterby-major-startswith-mba.aspx#1795473 the sample application here is also not filtering http://www.telerik.com/community/forums/aspnet-mvc/grid/is-there-a-way-to-save-grid-stage.aspx#1224347 回答1: The application you have referred uses hidden fields that are updated through js on DataBound event of the grid like $('#currentPage

Reordering Telerik Column after Grouping

柔情痞子 提交于 2019-12-11 19:10:10
问题 I am using a Telerik Grid to display data to the client. I have to show priority values first and then display non priority values. When the user group base on priority, the priority values should group first follow by the non priority group. I have a default descending grouping. When the user first access the page, it works fine. However, if the user remove the default grouping and try to group that column again, the non priority values are shown in the first group following by the priority

How can i set route value in client side for Telerik combobox

有些话、适合烂在心里 提交于 2019-12-11 15:24:50
问题 I have two combobox. I need get some value from first combobox1 after combobox1 has changed value and that put this value in Combobox2 route databinding.Ajax().Select("action","controller",-->route<<-) @(Html.Telerik() .ComboBoxFor(m => m.Country) .ClientEvents(e => e.OnChange"onCountryChange")) .BindTo(Model.ListCountry)) @(Html.Telerik() .ComboBoxFor(m => m.UnitOfAdministration) .ClientEvents(e => e.OnChange("onCityChange")) .BindTo(Model.ListUnitOfAdministration) .DataBinding(bind => bind

Telerik MVC DatePicker - Disable all future dates

蹲街弑〆低调 提交于 2019-12-11 12:55:12
问题 I have a Telerik MVC DatePicker : <%: Html.Telerik().DatePickerFor(model => model.Date) .TodayButton() .Max(DateTime.Now) .HtmlAttributes(new { @onkeypress = "return allowNumbersWithDot(event);", @onpaste = "return false;" }) %> By setting Max property, I get dates only till current date and all future dates are hidden. What I what is, enable all dates till current date and disable all future dates. i.e. user can see all dates but can select only till the current date. 回答1: The Max property

ASP.NET GetFullHtmlFieldId not returning valid id

梦想与她 提交于 2019-12-11 06:55:28
问题 In MVC2 template, I normally use this.ViewData.TemplateInfo.GetFullHtmlFieldId(fieldName) to generate the id field of an html element. This has worked in most of the cases. However this method does not actually return valid id field, it merely prefix fieldName with ViewData.TemplateInfo.HtmlFieldPrefix , this is causing problems for me when rendering collections which has [] in the HtmlFieldPrefix. I have been manually converting those characters to _ where I find the need, but this seems to

Changing scripts folder in MVC application and using Telerik MVC Extensions

一世执手 提交于 2019-12-11 04:22:36
问题 I am using the Telerik MVC Extensions and have moved my Scripts folder in to the Content folder. So instead of ... <script src="<%= Url.Content("~/Scripts/jquery-1.4.1.min.js") %>" type="text/javascript"></script> ... I now have ... <script src="<%= Url.Content("~/Content/Scripts/jquery-1.4.1.min.js") %>" type="text/javascript"></script> I realise that I can turn off jQuery inclusion with the ScriptRegistrar().jQuery(false) method, but how to I tell the Telerik MVC Extensions where the new

Custom Ajax Binding does not work properly

白昼怎懂夜的黑 提交于 2019-12-10 22:58:15
问题 I have following code for Custom Ajax Binding. This has following problems even though it is displaying data for the first page. • The request.Sorts is coming as NULL in to the Orders_Read method • The request.PageSize is coming as 0 to the Orders_Read method • The request.Page is coming as 1 to the Orders_Read method (even if I click on the page 2) What changes need to be done here to get proper sort and pagesize values? Note: I am using MVC Wrapper for Kendo Grid. VIEW @Scripts.Render("~