Dear,
We have tried to add autocomplete dynamically from partial view with Ajax.ActionLink, but they do not initialize, and not working.
We also managed to use different id-s on the inputs, but we standardize the name for achive out goal:
Dynamic load of partial view:
@Html.Partial("_Teszt", Model)
<div id="tobbSpecEszkoDiv">
</div>
@Ajax.ActionLink(
"Új",
"_Teszt",
"Home",
new AjaxOptions
{
UpdateTargetId = "tobbSpecEszkoDiv",
InsertionMode = InsertionMode.InsertAfter,
OnSuccess = "korteLo"
})
<script language="javascript">
function korteLo(e) {
$("input[id^='countries']").attr('name', 'countries');;
}
</script>
PartialView:
@using Kendo.Mvc.UI
@(Html.Kendo().AutoComplete()
.Name("countries"+DateTime.Now.Millisecond)
.Filter("startswith")
.Placeholder("Select country...")
.BindTo(new string[] {
"Albania",
"Andorra",
"Armenia",
"Austria",
"Azerbaijan",
"Belarus",
"Belgium",
})
.Separator(", ")
)
For further details we attached the project files.
Best regards.
Hi,
I'm trying to implement a custom command on my grid, which is using server binding, but the button just leads to a 'resource not found' error. My routing looks as it should and I can't see anything else wrong. I should also say that the MVC stuff is actually implemented in an 'area'. All my code is below, could anyone help?
Routing
1.context.MapRoute(2. "ControlPanel_default",3. "ControlPanel/{controller}/{action}/{id}",4. new { action = "Index", id = UrlParameter.Optional }5.);Index.cshtml
01.@(Html.Kendo().Grid(Model)02. .Name("Grid")03. .Columns(col =>04. {05. col.Bound(p => p.CustomerId);06. col.Bound(p => p.aspNetUserID);07. col.Command(cmd =>08. {09. cmd.Edit();10. cmd.Custom("Test").Action("Lockout", "Index");11. });12. })13. .Editable(edt => edt.Mode(GridEditMode.PopUp))14. .Pageable()15. .Sortable()16. .Scrollable()17. .DataSource(ds => ds18. .Server()19. .Model(mdl => mdl.Id(p => p.CustomerId))20. .Read("Index","Index")21. .Update("Update","Index")22. .Create("Create","Index")23. .Destroy("Destroy","Index"))24. )
IndexController.cs
01.public class IndexController : Controller02.{03. public ActionResult Index()04. {05. ViewBag.Title = "Home";06. return View(GetCustomers());07. }08. public ActionResult Lockout(int CustomerId)09. {10. if (ModelState.IsValid)11. {12. //var result = CustomerId;13. RouteValueDictionary routeValues = this.GridRouteValues();14. return RedirectToAction("Index", routeValues);15. }16. return View("Index");17. }18.}Hi,
I'm using a AutoComplete in my form (Grid Popup Editor template) and all the Validation works except that on the AutoComplete...(see Picture)
here is the Code for the AutoCompleteFor:
<div class="form-group m-xs"> <label class="col-sm-2 control-label">Postleitzahl:</label> <div class="col-sm-2"> @(Html.Kendo().AutoCompleteFor(m => m.Postleitzahl) .DataTextField("Postleitzahl_ID") .Filter(FilterType.StartsWith).MinLength(1) .NoDataTemplate("Keine Postleitzahl gefunden") .Suggest(true) .Height(300) .DataSource(source => { source.Read(read => { read.Action("Postleitzahl_Read", "Standorte") .Data("onAdditionalData"); }) .ServerFiltering(true); }) .Events(e => e .Select("onPostleitzahlSelect") )) @Html.ValidationMessageFor(model => model.Postleitzahl) </div>
here the part of the model class:
[Required][StringLength(8)]public string Postleitzahl { get; set; }[Required][StringLength(65)]public string Ort { get; set; }[Required][StringLength(255)]Hi,
We allow users to change the the value in each cells. However, the user doesn't like to see the width changes from displaying text to a textbox mode. Is there any way we can stop it so we keep the same width for the displaying text and textbox?
thanks!

Hello,
After spending a couple of hours trying to figure out why my custom popup editor template was failing with this javascript error in the kendo.all.min.js file: "0x800a03f1 - JavaScript runtime error: Expected '}' "
it turned out to be an inline javascript comment that was causing the error. I have a script tag at the top of my template with a couple of javascript functions and in them are some single-line comments using the '//' syntax. When I remove those the popup editor works just fine and when I put them back in it throws the error. Why is this happening? Is this a known issue? Is it documented anywhere?
Thanks,
Mike
I have a grid which looks good on until 1400 screen resolution but if i try to go less than that, i don't see right most columns. I don't want to use vertical scroll bar, so I have used this
.Scrollable(s => s.Height("auto"))
But even this, slight changed my grid look. column width changed. I have attached some screen shots so that you can see the difference
Hi,
robert

I have an issue when i tried to show more than one grid in the view.
This is my first grid that works fine.
@model IEnumerable<CampeonatoFutbol.Models.PartidoClub>
@(Html.Kendo().Grid(Model)
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.ClubDesc).Title("EQUIPO").Width(220);
columns.Bound(c => c.PrtidoCodigo).Title("PJ").Width(60);
columns.Bound(c => c.GolesClub).Title("GC").Width(60);
columns.Bound(c => c.PuntosClub).Title("PUNTOS").Width(150);
})
.HtmlAttributes(new { style = "height: 300px;" })
.Scrollable()
.Reorderable(reorder => reorder.Columns(true))
.Pageable(pageable => pageable
.PageSizes(true))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
)
)
And this the method action of the controller that render the html of that grid.
public ActionResult Campeonato()
{
//return a list for the grid
}
and whe i tried to put another grid in the same view, the second grid doesn´t show me anything
This is the second grid that i tried to use:
@(Html.Kendo().Grid<CampeonatoFutbol.Models.PartidoClub>()
.Name("gridGoleadores")
.Columns(columns =>
{
columns.Bound(c => c.NombreJugador).Title("JUGADOR").Width(220);
columns.Bound(c => c.ClubDesc).Title("EQUIPO").Width(60);
columns.Bound(c => c.GolesJugador).Title("GOLES").Width(60);
})
.HtmlAttributes(new { style = "height: 300px;" })
.Scrollable()
.Reorderable(reorder => reorder.Columns(true))
.Pageable(pageable => pageable
.PageSizes(true))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GoleadoresCampeonato", "Campeonato"))
.PageSize(20)
)
)
And this is the method action that it's never called:
public ActionResult GoleadoresCampeonato([DataSourceRequest]DataSourceRequest request)
{
return Json(list.ToDataSourceResult(request) )
}
I hope someone can helpme whit this.