Hi all,
I am facing a weird issue and I am not sure if this is a bug on my or your side.
My grid has 146 items and displays 10 at once, therefore I have 15 pages. When I click on the "next page" arrow it works fine (shows the next entries) until I arrive on page 6. Then the items are the same until page 10, and from 11 on my grid displays again different entries.
@using Haris.Web.Controllers.Admin
@using Haris.Web.Models.Admin
@{
ViewBag.Title = Texts.Views_UserRole_Index_Title;
}
@(Html.Kendo().Grid<UserRoleGridModel>()
.Name("userroles-grid")
.Columns(columns =>
{
columns.Bound(e => e.ClientId).Width(50).Title(Texts.Views_UserRole_Index_Grid_ClientId);
columns.Bound(e => e.Role).Width(350).Title(Texts.Views_UserRole_Index_Grid_RoleList).Sortable(false).Filterable(false);
})
.Sortable()
.Pageable(p =>
p.ButtonCount(5)
.PageSizes(GlobalSettings.PageSizeArray)
.Refresh(true)
)
.Filterable()
.Deferred()
.DataSource(dataSource =>
dataSource.Ajax()
.Events(ev => ev.RequestEnd("kendoGridRequestEnd").Error("kendoGridError"))
.Read(read => read.Action<UserRoleController>(c => c.List(null)).Data("kendoGridAntiForgery"))
.Destroy(builder => builder.Action("Delete", "UserRole").Data("kendoGridAntiForgery"))
.Model(factory => factory.Id(model => model.UserId))
)
.AutoBind(false))

I had a problem when trying to run the "Configure Project" from right-clicking the project to get to the UI for ASP.NET Menu. I can select the theme and click next then I change from Use CDN support to copy global resources and I get the UI for ASP.NET MVC Visual Studio Extensions have recovered from an error. What is it looking for on the file system and what didn't install or did I miss something during the installation process? The full error is below.
Thanks,
John
An error occurred while running the wizard.
Error executing custom action Telerik.VSX.Web.Actions.CopyResourcesAction: System.IO.DirectoryNotFoundException: Attempted to access a path that is not on the disk.
at Telerik.VSX.ProjectConfiguration.ProjectFileManager.CopyDirectoryContentsPrivate(String sourceFolderPath, String folderRelativePath, Boolean confirmOverwrite, Boolean overwrite, Boolean onlyUpdateFiles, String excludeDirectoryPattern)
at Telerik.VSX.ProjectConfiguration.ProjectFileManager.CopyDirectoryContents(String sourceFolderPath, String projectRelativePath)
at Telerik.VSX.Web.Actions.CopyResourcesAction.ModifyScripts()
at Telerik.VSX.Web.Actions.CopyResourcesAction.ModifyResources()
at Telerik.VSX.Web.Actions.CopyResourcesAction.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments, IProjectWrap project)
at Telerik.VSX.Actions.ProjectActionBase.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments)
at Telerik.VSX.WizardEngine.Actions.ActionBase.Telerik.WizardFramework.IAction.Execute(IWizardContext wizardContext, IPropertyDataDictionary arguments)
at Telerik.VSX.WizardEngine.ActionManager.ExecActions()
I am using the material theme on ASP.NET MVC.
Previously I had the following defined on .aspx pages containing Telerik controls:
<link href="https://kendo.cdn.telerik.com/2017.3.913/styles/kendo.common.min.css" rel="stylesheet" type="text/css" /><link href="https://kendo.cdn.telerik.com/2017.3.913/styles/kendo.material.min.css" rel="stylesheet" type="text/css" />
Upon closer reading of documentation, it states: "Use the common CSS file, which corresponds to the Kendo UI theme that is used as a base for your custom theme. For example, if you have created a custom theme from the built-in Material theme, then register kendo.common-material.min.css."
And so I changed the css define from kendo.common.min.css to kendo.common-material.min.css.
Now the grid behaves differently in that it is fixed to the screen width. I do not have scrolling enabled and previously it would grow to fit all columns. Now with common-material defined it does not grow but stays fixed to the browser width and thus shrinks columns so that their text is no longer shown when the browser width is small. Again the only thing changed on the page is the css define and nothing to do with the kendo.grid code.
Is this a known difference between material common and standard common in terms of grid width? Are there known downsides to running a theme with the standard common? I am tempted to just switch back since everything seemed to be displaying fine. But it just goes against the documentation statement to use the common matching the theme.
I have the following window code with 2 date picker controls which read and write to 2 date properties on my model
The window can read the properties fine, but can never set them, even though if I re-open the window control it knows what the new values are.
Is there some kind of validation or commit function that needs to called before closing the window object?
@(Html.Kendo().Window()
.Name("ReportRefreshOptionsDialog")
.Title("Schedule Report Options")
.Content(@<text>
<div class ="left" width:100px>From:</div>
@(Html.Kendo().DatePicker()
.Name("Model.ScheduleReport.FromDate")
.Value(Model.ScheduleReport.FromDate)
.HtmlAttributes(new { style = "width:150px" })
)
<div class ="left" width:100px>To:</div>
@(Html.Kendo().DatePicker()
.Name("Model.ScheduleReport.ToDate")
.Value(Model.ScheduleReport.ToDate)
.HtmlAttributes(new { style = "width:150px" })
)
<p></p>
<div align="right"><button id="btnReportOptionsOk">Ok</button></div>
</text>)
.Modal(true)
.Width(250)
.Visible(false)
.Actions(actions => actions.Close())
)

Hello,
I have an edit template for the edit popup in the grid,
but when I make update some fields are empty, the bind doesn't work.
This is the view:
@model OrdiniCRA.ViewModels.Customers.OrderDetailViewModel
<br />
@Html.AntiForgeryToken()
@Html.HiddenFor(model => model.PurchaseOrdId)
@Html.HiddenFor(model => model.Position)
@Html.HiddenFor(model => model.Line)
@Html.HiddenFor(model => model.Supplier)
@Html.HiddenFor(model => model.TotalAmount)
<div id="ch" class="col-md-offset-4 col-md-10">
@(Html.Kendo().CheckBox().Name("ArtFornit").Checked(false).Label("Filtra per articolo fornitore").HtmlAttributes(new { onchange = "updateMsg();" }))
</div>
<div class="col-md-offset-4 col-md-8">
@Html.Label("Tipo Riga")
</div>
<div class="col-md-offset-4 col-md-8">
@Html.Kendo().DropDownListFor(m => m).DataTextField("Text").Name("LineType").DataValueField("Text").Value("MERCE").Events(e => e.Select("onSelect")).BindTo(new List<SelectListItem>() {
new SelectListItem() {
Text = "MERCE",
Value = "3538947"
},
new SelectListItem() {
Text = "NOTA",
Value = "3538944"
}
}).Value("MERCE")
@Html.ValidationMessageFor(model => model.LineType)
</div>
<div id="lart" class="col-md-offset-4 col-md-8">
@Html.LabelFor(model=>model.Item)
</div>
<div class="col-md-offset-4 col-md-8">
@(
Html.Kendo().ComboBoxFor(m => m.Item).Name("Item")
.Height(400).HeaderTemplate("<div class=\"dropdown-header k-widget k-header\"><span>Codice </span><span>Descrizione</span></div>").Template("<h3>#: data.Item #</h3><p>#: data.Description #</p>")//.ValueTemplate("<span>#: data.Item#</span>")
.Placeholder("Scegli un articolo")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetItem", "Ordini")
.Data("artForn");
}).ServerFiltering(true);
})
.Events(e =>
{
e.Change("change");
})
.AutoBind(false)
.Filter(FilterType.Contains)
.DataValueField("Item")
.DataTextField("Item")
)
@Html.ValidationMessageFor(model => model.Item)
</div>
<div id="ldesc"class="col-md-offset-4 col-md-8">
@Html.Label("Descrizione Articolo")
</div>
<div class="col-md-offset-4 col-md-8">
@(Html.Kendo().EditorFor(model=>model.Description)
.Name("Description").Tools(tools => tools
.ViewHtml()
).Value(@<text><p>
Read <a href="">more details</a>
</p>
</text>)
)
@Html.ValidationMessageFor(model => model.Description)
</div>
<div id="lum" class="col-md-offset-4 col-md-4">
@Html.Label("UM")
</div>
<div class="col-md-offset-4 col-md-4">
@Html.Kendo().DropDownListFor(model => model.BaseUoM).Name("BaseUoM").DataTextField("BaseUoM").DataValueField("BaseUoM").DataSource(source =>
{
source.Read(read =>
{
read.Action("GetUom", "Ordini")
.Data("filterUnitValue");
}).ServerFiltering(true);
}).Enable(false).AutoBind(false).CascadeFrom("Item")
@Html.ValidationMessageFor(model => model.BaseUoM)
</div>
<div id="lpconf" class="col-md-offset-4 col-md-10">
@Html.Label("Pezzi per confezione")
</div>
<div class="col-md-offset-4 col-md-10">
@Html.Kendo().DropDownListFor(model => model.PezziConf).Name("PezziConf").DataTextField("MinimumSaleQty").DataValueField("MinimumSaleQty").DataSource(source =>
{
source.Read(read =>
{
read.Action("GetPezziConf", "Ordini")
.Data("filterDueValue");
}).ServerFiltering(true);
}).Enable(false).AutoBind(false).CascadeFrom("Item")
@Html.ValidationMessageFor(model => model.PezziConf)
</div>
<div id="lqty" class="col-md-offset-4 col-md-10">
@Html.Label("Quantità ")
</div>
<div class="col-md-offset-4 col-md-10">
@Html.Kendo().NumericTextBoxFor(model => model.Qty).Decimals(2).Min(1).Max(99999.0).Value(1).Name("Qty")
@Html.ValidationMessageFor(model => model.Qty)
</div>
<div id="lpr" class="col-md-offset-4 col-md-10">
@Html.Label("Valore Unitario")
</div>
<div class="col-md-offset-4 col-md-10">
@Html.Kendo().DropDownListFor(model => model.UnitValue).DataTextField("UnitValue").Name("UnitValue").DataValueField("UnitValue").Events(events => events.Change("OrderDetailsEdit_Price_Change")).DataSource(source =>
{
source.Read(read =>
{
read.Action("GetUnitValue", "Ordini")
.Data("filterDueValue");
}).ServerFiltering(true);
}).Enable(false).AutoBind(false).CascadeFrom("Item")
@Html.ValidationMessageFor(model => model.UnitValue)
</div>
<div id="lsc" class="col-md-offset-4 col-md-10">
@Html.Label("Sconto")
</div>
<div class="col-md-offset-4 col-md-10">
@Html.Kendo().DropDownListFor(model => model.DiscountFormula).Name("DiscountFormula").DataTextField("DiscountFormula").DataValueField("DiscountFormula").DataSource(source =>
{
source.Read(read =>
{
read.Action("GetDF", "Ordini")
.Data("filterDueValue");
}).ServerFiltering(true);
}).Enable(false).AutoBind(false).CascadeFrom("Item")
</div>
<div id="lect" class="col-md-offset-4 col-md-10">
@Html.Label("EcoTassa")
</div>
<div class="col-md-offset-4 col-md-10">
@Html.Kendo().DropDownListFor(model => model.EcoTassa).Name("EcoTassa").Value("0").DataTextField("EcoTassa").DataValueField("EcoTassa").DataSource(source =>
{
source.Read(read =>
{
read.Action("GetEcoT", "Ordini")
.Data("filterDueValue");
}).ServerFiltering(true);
}).Enable(false).AutoBind(false).CascadeFrom("Item")
</div>
<div id="ltaxc" class="col-md-offset-4 col-md-10">
@Html.Label("Codice IVA")
</div>
<div class="col-md-offset-4 col-md-10">
@Html.Kendo().DropDownListFor(model => model.TaxCode).Name("TaxCode").DataTextField("TaxCode").DataValueField("TaxCode").DataSource(source =>
{
source.Read(read =>
{
read.Action("GetTaxCode", "Ordini")
.Data("filterUnitValue");
}).ServerFiltering(true);
}).Enable(false).AutoBind(false).CascadeFrom("Item")
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}

hello,
it is possible to create grid with crud inside custom command ?, ( http://demos.telerik.com/aspnet-mvc/grid/custom-command )
if yes , can you show me example for the code ? ,
if not , can you show me something similiar ?
thanks :D

Okay, so I have a grid that is used to manage Users. I would like to have two edit-popup buttons,
1.) For changing the user's password
2.) For changing the rest of the user's information
I currently have 1 command.Edit() button that has a custom template specified in ".Editable" that works fine with changing the user's information.
I would like to have a second button that is associated with a different template that changes the user's password.
I thought that this could be achieved through a Command.Custom() button; however, I'm not sure how I'd hook it up to the Grid's edit event.
Is this even possible? If not, is there any known workaround to achieve this functionality?
Kind regards,
Ruben
We are using a pretty standard grid in an ASP.NET MVC application, and are using the built-in filtering offered by the control. When we filter our data using brackets ([) or braces ({) (as some our data is in the format [My Name] or My Name{#2}), and Export to Excel, we end up with an empty spreadsheet. Other special characters seems to work correctly (_, *, #, etc). Is there a way I can get these characters to work when included in a filter? When exporting all rows, these bracket- and brace-containing entries appear as expected, so they are not being excluded from the grid because of the special characters.
Thanks,
Jim

Following problem: I've got a "detail" grid as element of a ClientDetailTemplate of a "master" grid. One column ("IsActive" in this example) in the detail grid should get a ClientTemplate, whose value is dependent on a property from the detail grid's data:
@(Html.Kendo().Grid<MasterEntity>()
.Name("masterGrid")
.Columns(columns =>
{
...
})
.ClientDetailTemplateId("detailsTemplate")
.DataSource(...))
)
<script id="detailsTemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid<DetailEntity>()
.Name("detailGrid_#=Id#")
.Columns(columns =>
{
columns.Bound(p => p.IsActive).ClientTemplate("#= IsActive #");
})
.DataSource(...)
.ToClientTemplate()
)
</script>
Unfortunately, the expression "#= IsActive #" in the detail template cannot be evaluated correctly. The "scope" for the template is set to the master grid - thus I can add an expression to a property of the master grid, but not the detail grid. How can I achieve to set a ClientTemplate for the detail grid column with property expressions to the client grid data?
Thanks, Dimitrij
