Hello,
I am very new to Kendo UI. Thanks for providing the Demos which are dam good and very useful for the beginners.
Have an issue with tree view.
Scenario:
I have two tree views.
First tree view contains options to add, delete, reorder the nodes in the second tree view.
Add- appends a node using Append method.
Reorder – Move the selected node up or down using the methods insertAfter and insertBefore
When am adding a node with some selection in the second tree view, it appends the node as the last node to the second tree and selection on the second tree view is retained.
But when I reorder the nodes using the above mentioned methods with some selection on second tree view, the selection was not retained after reordering.
Can anyone help me in retaining the selection .
Thanks,
Harika.
@Html.Kendo().TabStrip().Name("tabstrip").Items(items => { items.Add().Text("Home").Action("Index", "Home"); items.Add().Text("About").Action("About", "Home"); })transition: 'slide'
@model LicenseVerification.Models.tc_person@{ ViewBag.Title = "SearchPerson";}<h2>Index cshtml</h2><script src="@Url.Content("~/Scripts/jquery.validate.min.js")"type="text/javascript"></script><script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")"type="text/javascript"></script>@using (Html.BeginForm("SearchResults", "PersonSearch")){ @Html.ValidationSummary(true) <fieldset> <legend>tc_person</legend> <div class="editor-label"> @Html.Label("first_name", "First Name") </div> <div class="editor-field"> @Html.Editor("first_name", "First Name") @Html.ValidationMessageFor(model => model.first_name) </div> <div class="editor-label"> @Html.Label("last_name", "Last Name") </div> <div class="editor-field"> @Html.Editor("last_name", "Last Name") @Html.ValidationMessageFor(model => model.last_name) </div> <p> <input type="submit" value="Search" /> </p> </fieldset>}using System.Linq;using System.Web.Mvc;using LicenseVerification.Models;using System.Collections;namespace LicenseVerification.Controllers{ public class PersonSearchController : Controller { private be_cactusEntities db = new be_cactusEntities(); public ActionResult Index() { return View(); } public ActionResult SearchResults(string firstName = "", stringlastName = "") { return View(GetEducators(firstName,lastName)); } private IEnumerable GetEducators(string firstName = "", stringlastName = "") { var educators = from e in db.tc_person where e.first_name.Contains(firstName) && e.last_name.Contains(lastName) select e; ViewBag.firstName = firstName; ViewBag.lastName = lastName; return educators; } protected override void Dispose(bool disposing) { db.Dispose(); base.Dispose(disposing); } }}@model IEnumerable<LicenseVerification.Models.tc_person><h2> Without Partial</h2>@{ string lastName = "NULL"; string firstName = "NULL"; if (ViewBag.lastName != null) { lastName = ViewBag.lastName; } if (ViewBag.firstName != null) { firstName = ViewBag.firstName; } }@(Html.Kendo().Grid(Model) .Name("Grid") .Columns(cols => { cols.Bound(p => p.person_id).Groupable(false); cols.Bound(p => p.first_name); cols.Bound(p => p.last_name); }) .Pageable(pageable => pageable.PageSizes(true).PageSizes(new int[] { 10, 25 })) .Sortable())<p />lastName is @lastName<br />firstName is @firstName//------------------------------------------------------------------------------// <auto-generated>// This code was generated from a template.//// Manual changes to this file may cause unexpected behavior in your application.// Manual changes to this file will be overwritten if the code is regenerated.// </auto-generated>//------------------------------------------------------------------------------using System;using System.Collections.Generic;namespace LicenseVerification.Models{ public partial class tc_person { public tc_person() { this.tc_experience = new HashSet<tc_experience>(); this.tc_license = new HashSet<tc_license>(); this.tc_certificate = new HashSet<tc_certificate>(); } public decimal person_id { get; set; } public System.DateTime date_record_added { get; set; } public string prefix { get; set; } public string last_name { get; set; } public string first_name { get; set; } public string middle_name { get; set; } public string suffix { get; set; } public string preferred_name { get; set; } public string maiden_name { get; set; } public string aka { get; set; } public string ethnic_code { get; set; } public string gender { get; set; } public Nullable<System.DateTime> dob { get; set; } public Nullable<System.DateTime> deceased_date { get; set; } public string citizenship { get; set; } public string nclb_veteran { get; set; } public Nullable<System.DateTime> ethics_test { get; set; } public virtual ICollection<tc_experience> tc_experience { get; set; } public virtual ICollection<tc_license> tc_license { get; set; } public virtual ICollection<tc_certificate> tc_certificate { get; set; } } }//------------------------------------------------------------------------------// <auto-generated>// This code was generated from a template.//// Manual changes to this file may cause unexpected behavior in your application.// Manual changes to this file will be overwritten if the code is regenerated.// </auto-generated>//------------------------------------------------------------------------------using System;using System.Data.Entity;using System.Data.Entity.Infrastructure;namespace LicenseVerification.Models{ public partial class be_cactusEntities : DbContext { public be_cactusEntities() : base("name=be_cactusEntities") { } protected override void OnModelCreating(DbModelBuilder modelBuilder) { throw new UnintentionalCodeFirstException(); } public DbSet<tc_assignment> tc_assignment { get; set; } public DbSet<tc_experience> tc_experience { get; set; } public DbSet<tc_person> tc_person { get; set; } public DbSet<tc_license> tc_license { get; set; } public DbSet<tc_certificate> tc_certificate { get; set; } public DbSet<tc_endorsement> tc_endorsement { get; set; } public DbSet<tcc_license_level> tcc_license_level { get; set; } public DbSet<tcc_license_status> tcc_license_status { get; set; } public DbSet<tcc_qualified_by> tcc_qualified_by { get; set; } }}