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

Hi,
I would like to have a button on toolbar in grid and then by clicking on the button the pup up appears. Then It provides opportunity to add new raw in the grid (insert information in sql server). I am not sure which ways are better, using 1.toolbar.Create() or 2.toolbar.custom()?
1. if I use toolbar.Create().Text("default add"), I have Create(create => create.Action("AddNewSample", "MyController", new { model = "#=MyModel#" })) in DataSource.
Then, I have the popup, but I don't know how I can add information through Update button. It seems it does not call the function in controller.
here is my controller:
public ActionResult AddNewSample(long? A, string B, string C, DateTime D)
{
if (ModelState.IsValid)
{
db.Sp_Sample_Ins(A, B, C, D);
}
return View("Index");
}
2. But If I use toolbar.Custom(), I should create pop up window myself. so I have toolbar.Custom().Text("Add New Sample").HtmlAttributes(new { id = "customCommand" });
and in JavaScript I tried to follow this:
http://demos.telerik.com/aspnet-mvc/grid/custom-command
Preferably, I would like to have a template in another page(not on my Grid's page).
but I dose not work.
I appreciate any suggestion and help.

When using this code from the server import/export demo, hidden rows get expanded to the default width, while using the frontend excel export preserves the row height
[HttpPost] public ActionResult Download(string data, string extension) { var workbook = Workbook.FromJson(data); using (var stream = new MemoryStream()) { workbook.Save(stream, extension); var mimeType = Telerik.Web.Spreadsheet.MimeTypes.ByExtension[extension]; return File(stream.ToArray(), mimeType, "Exported" + extension); } }