I'd like to load the first item in my MobileTabStrip (a remote partial view) by default. How can I accomplish this? Right now, the application works but I have to click on a tab strip item to load content.
My mobile layout is like the following:
@{ Html.Kendo().MobileLayout()
.Name("Test")
.Footer(() =>
{
Html.Kendo().MobileTabStrip()
.Items(items =>
{
items.Add().Icon("globe").Text("Stuff").Url(@Url.RouteUrl(new { Controller = "Controller1", Action = "Index" }));
items.Add().Icon("contacts").Text("Some other stuff").Url(@Url.RouteUrl(new { Controller = "Controller2", Action = "Index" }));
})
.Render();
})
.Render();
}
I'm trying to populate a keno grid with columns from two different objects.
Subscriber, and Subscription.
Both these objects are different entities.
Right now I can only bind one of them to my grid at a time and create columns for it. Is there any way I can bind both of these objects to my grid without having to merge the two entities together?
So, ASP.NET MVC project, using Telerik UI for ASP.NET MVC v Q3 2014.
In a view I have this Scheduler widget nicely configured and running well. The view being used is timeline view.
I am wondering how I can make all "time"-columns (not the group column(s)) narrower? I am required to just fit stuf in a much larger timespan that the current styling can accommodate on the page on the screen.
I thought I could via CSS by changing widths for classes like k-today or k-slotcell and the like, but that only made the scheduler display things wrongly.
Thanks!
Hi,
First, I hope this is the right place to post this, since it is my first post.
I am working with 2 TreeViews and I need to be able to expand and collapse each of them and search one of them.
I have found code on the web that works great, on the web, but I cannot get it to work in my app.
So, I am trying to troubleshoot why and it is really difficult because I do not know what ".k-" things are. I have search all through Telerik and StackOverflow and Googled till my eyes have bled, but cannot find any information on them.
Some, I can guess at, but others, I can't, as below:
So can someone tell me:
A) Am I correct on the ones I have guessed at.
B) For the ones that I have wrong or have no clue - what are they?
C) Is there somewhere to find out what any other ".k-" things are? As you all know, the documentation for kendo is horrendous.
TIA,
Bob Mathis

Hello,
it's been some hours that i have been trying to display a dropdownlist in my grid instead of the numeric textfield that appears for a specific column ( which is a foreign key).
When i click on the edit button, this column displays a textfield with the possibility to select the ID only. I want the name instead.
This is my code:
PS: the rows displayed in my grid are NoteForm objects and the foreign key i'm talking about is languageId ( the table is language)
[Table("note")] public class NoteForm { [Required] [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] [Display(Name = "Title")] public string Title { get; set; } [Required] [Display(Name = "Text")] public string Text { get; set; } [Required] [Display(Name = "Language")] public int languageId { get; set; } [ForeignKey("languageId")] [UIHint("LangDropDown")]<!--- I TRIED TO ADD THIS ATTRIBUTE -->
public virtual Language language { get; set; } [Key] public int id { get; set; } public int userId { get; set; } } [Table("Language")] public class Language { public string lang { get; set; } [Key] public int id { get; set; } }My View:
@using Kendo.Mvc.UI@model DevelopmentNotesProject.Models.NoteForm@{ ViewBag.Title = "Index";}<script type="text/javascript"> function formatter(value) { return value.substring(0, 50); }</script><section id="listing"> <h2>My Notes</h2> @(Html.Kendo().Grid<DevelopmentNotesProject.Models.NoteForm>() .Name("grid") .Columns(columns => { columns.Bound(c => c.Title).Width(160).ClientTemplate(string.Format("{0}...", "#= formatter(Title) #")); columns.Bound(c => c.Text).Width(450).ClientTemplate(string.Format("{0}...", "#= formatter(Text) #")); columns.ForeignKey(p => p.languageId, (System.Collections.IEnumerable)ViewData["lang"], "Id", "Name").Title("Language").Width(140).EditorTemplateName("LangDropDown"); <!--LangDropDown is the name of my partial view i have created in the Shared/Partial folder-->
columns.Command(command => { command.Edit(); command.Destroy(); }); }) .HtmlAttributes(new { style = "height: 380px;" }) .Scrollable() .Groupable() .Sortable() .Pageable(pageable => pageable .Refresh(true) .PageSizes(true) .ButtonCount(5)) .DataSource(dataSource => dataSource // Configure the grid data source .Ajax() // Specify that ajax binding is used .Read(read => read.Action("Notes_Read", "MyNotes")) // Set the action method which will return the data in JSON format .Destroy(update => update.Action("Notes_Destroy", "MyNotes")) .Update(update => update.Action("Notes_Update", "MyNotes")) .Model(model => { model.Id(p => p.id); }) ) .Selectable() ) </section>@Html.ActionLink("Add a new note", "Add", "MyNotes") @section Scripts { @Scripts.Render("~/bundles/jqueryval") }My partial View:
@using Kendo.Mvc.UI@(Html.Kendo().DropDownList() .Name("Alllanguages") .DataValueField("Id") .DataTextField("Name") .BindTo((System.Collections.IEnumerable)ViewData["lang"]) )Controller:
public ActionResult Index(){ var dbo = new UsersContext(); ViewData["lang"] = dbo.Language.Select(b => new { Id = b.id, Name = b.lang }); return View();}Thanks a lot for your help
I have in my View the following:
columns.Bound(o => o.line.ApprovalBy.UserDisplayName)
columns.Bound(o => o.line.ItemNumber)
Using JQuery,I am able to edit the Item Number line with the following:
('#grid').data('kendoGrid').dataSource.at(0).line.ItemNumber = 155
However, when I try to edit Approval By which is by default set to null with the following:
('#grid').data('kendoGrid').dataSource.at(0).line.ApprovalBy = {UserID: 50}
It returns an "undefined" in the grid for some reason.
When I try to edit an object that has been initialized previously, it would be able to work:
columns.Bound(o => o.line.Vehicle.Color);
('#grid').data('kendoGrid').dataSource.at(0).line.Vehicle.Color = "red";
What am I missing?
How can we bind autocomplete's selected values to model so I can use those values on the server? The examples I have seen so far only selects the values on client side and diaplay them as tags. I want to populate the values into control using Ajax call, but after items are selelted i want selected values to be passed to model using model binding. How that can be done?
In my project, I use the fluent notation.
Situation:
A grid with filterable mode on "row" and with a detailtemplate, bound to a list of objects.
Problem:
In the head of the grid, there are 2 rows (column titles + filters). The filter row contains only 1 <th> element, instead of 2.
-------------------------------------------| | [ControleId_Title] |-------------------------------------------| [ControleId_Filter] | --> ??? -------------------------------------------| [k-hierarchy-cell] | 11 || [k-hierarchy-cell] | 12 |-------------------------------------------In the JS variant of the grid, it works (see http://jsfiddle.net/Sbb5Z/1715/), but in the fluent notation, it doesn't work.
My attachment contains a standard VS 2013 MVC Solution, with the Kendo scripts added. You just have to download the packages AND paste your Kendo.Mvc.dll in the bin folder of the project.
Hi,
I am using Multi select filter in the grid. The requirement for me is to sort the items in the filter list by alphabetical order. Can some one tell me how can i sort that list
I am using this following code and it is working fine as expected, but i want to sort the list
columns.Bound(p => p.Name).Width(300).Filterable(x => x.Multi(true)).Lockable(false);