I have a form with autocomplete the works fine until I post the form and it comes back. Then when entering data in the field, it does go to the server to filter, but does not show a dropdown.
Is there a way to reset the autocomplete on the form return?
I have a PartialView that contains two linked Kendo ListBoxes and some other Textboxes and some hidden fields. I want to render the form inside of the Kendo Dialog. I can find examples of inserting these types of controls here: http://demos.telerik.com/aspnet-mvc/dialog/treeview-integration
But I am trying to using this partial form a bound MVC form to update the object model.
How do I render a PartialView in a dialog?
Hello
I have a grid containing a list of work items with a detail template displaying details about each item. The detail template is a tabstrip where one tab contains the date and text for the last action taken on that work item. I'm having trouble setting the date in a datepicker.
Here is the code for the tab:
items.Add().Text("Last action").Content(@<
text
>
#var ldate=kendo.toString(lastActionDate, "yyyy-MM-dd")#
<
div
class
=
'cssLastAction'
>#=ldate#
<
div
>lastActionDate">@(Html.Kendo().DatePicker().Name("#=ldate#").Value("#=ldate#").ToClientTemplate())</
div
>
<
textarea
rows
=
"10"
class
=
"textArea"
id
=
"lastAction"
name
=
"lastAction"
data-bind
=
"value:lastAction"
>#= lastAction # </
textarea>
</
div
>
</
text>
);I have removed some unnecessary code to keep it readable. First I take my lastActionDate from the model and format it to a string, after that I just write the result on the screen #=ldate# to see that I get a value.
I then also write it as name for the datepicker, again to see that i get the value when inspecting the datepicker .Name("#=ldate#")
Last of all i also write it as the value of the datepicker .Value("#=ldate#")
The problem is that when I inspect the datepicker it doesn't even have a value attribute.
BUT if I instead hardcode a value .Value("1950-01-01") everything works fine.
Why is it that ldate work in the name field but not in the value field for the datepicker and why does the hardcoded value work but the variable parsed as a string doesn't?
Best regards
Jonas
Hi,
I've placed an MVC wrapped DateTimePicker inside a kendo template, but the problem I'm having is setting the value. Here's the code I'm using:
(Html.Kendo().DateTimePicker()
.Name("activeTime-#=Ordinal#")
.Min(new System.DateTime(1970, 1, 1, 0, 0, 0)) // Epoch
.Format("MM-dd-yyyy HH:mm")
.TimeFormat("HH:mm")
.HtmlAttributes(new { style = "width:100%" })
.Value("#: kendo.toString(ActiveDT, 'MM-dd-yyyy HH:mm') #")
.ToClientTemplate()
)
This loads a DateTimePicker inside the list view, however the value of the picker is always blank. I've tried a few things to fix it (deferring, outputting a javascript date object instead of a string, changing everything to create the datetimepicker through javascript rather than the wrapper) and I'm at a bit of a dead end, I was just wondering where exactly I'm going wrong.
Thanks,
Kevin
I have a Kendo PanelBar and Menu declared in my MVC Layout and they slow down my page render by about 10 seconds each. These used to be Telerik controls for MVC 3, and I made minimal code changes to convert them to the Kendo controls for MVC 5. The old Telerik version does not experience these slow load times. I know that my PopulateSiteMapAttribute is not the issue, as that code takes 0 seconds to run. Can you give me any clues as to what might be causing this slowness?
If I remove this block from my MVC Layout, the page renders 20 seconds faster:
@{ Html.Kendo().Menu()
.Name("TopNavigation")
.HtmlAttributes(new { @class = "topNavigation" })
.BindTo("PA.web.mvc.sitemap", (item, node) =>
{
if (!string.IsNullOrEmpty(node.ControllerName) && !string.IsNullOrEmpty(node.ActionName))
{
item.ControllerName = node.ControllerName.ToLower();
item.ActionName = node.ActionName.ToLower();
item.Text = node.Title.Substring(0, node.Title.IndexOf("|"));
item.HtmlAttributes.Add("class", node.Title.Substring(node.Title.IndexOf("|") + 1));
}
})
.Render();
}
Hello, when I edit events the order of ressources changes.
is possible to fix this order ?
Hallo,
I am just having this Problem and i don't know why !!
This is also happening in one of you Demos too.
Here is the Link :
https://demos.telerik.com/aspnet-mvc/scheduler/selection
In case it is working fine on your Side, I'll attach a Pic of the Issue (see the Link above).
Thanks in advance
Drag and drop feature is not behaving as expected. When trying to drag and drop an item from one place to another, it always gets dropped at the end of the targeted parent node and not at the desired place. As a result it becomes the last node of the parent. Can't move a node in between two nodes.
I see that when doing a copy a Create call is executed and when doing a move it executes Create and Destroy. Is there a way to detect when a copy was done vs a move? When doing a move, I actually need to do a move in the back end so a Create and Destroy does not work for me.
Thanks,
I'm having trouble saving the value that's selected in the drop down list on a grid. It's as though the model doesn't update. The drop down list comes up when I click the edit button. The drop down is populated, but when I hit update and the code makes it to UpdateAdHocOrderDetails, but both the MailingListId and MailingListName are what they were before the update. What have I missed wiring up or what did I wire up incorrectly?
Code in my view....
<div class="content">
@(Html.Kendo()
.Grid<IndexViewModel>()
.Name("kendoGrid")
.Columns(columns =>
{
columns.Bound(c => c.OrderDetail.Isbn).Title("ISBN").Width(135);
columns.Bound(c => c.OrderDetail.Title).Width(300);
columns.Bound(c => c.OrderDetail.Author).Width(125);
columns.Bound(c => c.OrderDetail.CartonQuantity).Title("Carton QTY").Width(140);
columns.Bound(c => c.OrderDetail.OrderedQuantity).Title("QTY").Width(90);
columns.Bound(c => c.OrderDetail.MailingListName).Title("Mailing List").ClientTemplate("#=OrderDetail.MailingListName#").Width(90);
columns.Bound(c => c.OrderDetail.OnHand).Title("On Hand QTY").Width(90);
columns.Bound(c => c.OrderDetail.AMROM).Title("ROM").Width(140);
columns.Bound(c => c.OrderDetail.SuggestedQuantity).Title("Recommended Order QTY").Width(140);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(150);
})
.ToolBar(toolbar => toolbar.Custom().Text("Clear All Filters").Url("#").HtmlAttributes(new { onclick = "ClearAllFilters('kendoGrid')", @class = "k-primary" }))
.Scrollable()
.Sortable()
.Filterable()
.Editable(editable => editable.Mode(GridEditMode.InLine).ConfirmDelete("test").DisplayDeleteConfirmation(true))
.Pageable(pageable => pageable
.Refresh(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(12)
.Model(model => {
model.Id(p => p.OrderDetail.OrderDetailId);
model.Field(p => p.OrderDetail.OrderDetailId).Editable(false);
model.Field(p => p.OrderDetail.Isbn).Editable(false);
model.Field(p => p.OrderDetail.Title).Editable(false);
model.Field(p => p.OrderDetail.Author).Editable(false);
model.Field(p => p.OrderDetail.CartonQuantity).Editable(false);
model.Field(p => p.OrderDetail.OrderedQuantity).Editable(true);
model.Field(p => p.OrderDetail.MailingListName).Editable(true);
model.Field(p => p.OrderDetail.OnHand).Editable(false);
model.Field(p => p.OrderDetail.AMROM).Editable(false);
model.Field(p => p.OrderDetail.SuggestedQuantity).Editable(false);
})
.Sort(sort => sort.Add(order => order.OrderDetail.OrderDetailId).Descending())
.Read(read => read.Action("GetAdHocOrderDetails", "Adhoc").Data("gridInfo"))
.Update(update => update.Action("UpdateAdHocOrderDetails", "Adhoc").Data("gridInfo"))
.Destroy(update => update.Action("RemoveAdHocOrderDetails", "Adhoc").Data("gridInfo"))
.Events(events => {
events.Change("OnGridChange");
events.Error("error_handler");
})
.ServerOperation(false))
.Events(events => events.DataBound("onDataBound"))
.Resizable(resize => resize.Columns(true))
)
</div>
Code in Views\Shared\EditorTemplates\MailingListEditor.cshtml.....
@(
Html.Kendo().DropDownListFor(model => model.OrderDetail.MailingListName)
.Name("MailingListName")
.DataTextField("MailingListName")
.DataValueField("MailingListId")
.OptionLabel("Select a mailing list...")
.DataSource(source =>
{
source.Read(read => { read.Action("GetMailingLists", "Adhoc"); });
}))
)
Code in the model....
[UIHint("MailingListEditor")]
public string MailingListName { get; set; }
public int MailingListId { get; set; }
Code in the controller....
[AcceptVerbs(HttpVerbs.Post)]
[AuthorizeUser(AccessLevel = "Publisher")]
public ActionResult UpdateAdHocOrderDetails([DataSourceRequest] DataSourceRequest request, IndexViewModel lineItem, int orderId)
{
}