Telerik Forums
UI for ASP.NET MVC Forum
0 answers
104 views

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.

Harika
Top achievements
Rank 1
 asked on 14 Sep 2012
0 answers
190 views
So I have 2 trees, one pulls data that consists of parent and child nodes and another that has the same. What I want to do is to allow a user to drag and/or double click on a node, whether it be a child or a parent and add that to the other treeview. If though an action is done to move a child node from one tree to another and the same parent exists in both, then that child node, whether user drags and drops or double clicks will automatically route to the correct parent node. This way, a user couldn't accidently move a child node into the wrong parent node. I really hope this makes sense as I have tried several things to no avail and had assumed that this would be more straight forward. 

Thanks much.
Mark
Top achievements
Rank 1
 asked on 13 Sep 2012
1 answer
151 views
Hi,

So just working through the mobile demo (http://docs.kendoui.com/tutorials/build-apps-with-kendo-ui-mobile) and I am attempting to use the MVC wrappers where applicable, for instance tabstrip.

It would appear that they don't pick up the styles and js properly and don't render quite as they should.

so this code:

@Html.Kendo().TabStrip().Name("tabstrip").Items(items =>
                {
                    items.Add().Text("Home").Action("Index", "Home");
                    items.Add().Text("About").Action("About", "Home");
                })

doesn't pick up the mobile style and ignores the 
transition: 'slide'

setting. 

Are the wrappers supposed to work with a mobile app project?
Iliana Dyankova
Telerik team
 answered on 13 Sep 2012
1 answer
264 views
Hello,


I'm new to Kendo UI, so this may turn out to be pretty trivial. I have an ajax bound grid that's initially bound to a set of records. I'm planning on having a form within the same page which the user will fill out to add new records, I'm not using inline or popup editing because the data needed to generate a new record won't necessarily have a 1:1 correspondence with the grid model's fields and because of interface design requirements. My question is, after adding a new record to the set via ajax, how can I refresh the grid to reflect the changes made to the set? I provide a test solution I tinkered with, I tried to hook into the dataSource's change event and refreshing the grid after I successfully call .read() on it, but to no avail, I have an html button I call to add a mock random record server side. Any suggestions? Am I missing something?
Rosen
Telerik team
 answered on 13 Sep 2012
1 answer
174 views
Here is the scenario. I have a Kendo grid of a VIEW(3 joined tables) not of a table. I have created a checkbox that is bound to the primary key field. After hours of searching I figured out how to select and deselect all of the checkboxes by clicking the header.  I cannot however figure out how to send multibple ID's to the controller so that I can validate and update the records.

My idea is to have javasciprt iterate through the list and compile a delimited string of ID's which would be stored in a hidden field. Easy peasy right? No  of course not. I have tried and searched high and low and nothing works. Very frustrating.

I did find some javascript code that doesnt do what I want but I tried to modify it and make it work. Can't do it. Can anybody help me out there? The code I found is below... I don't need the last part of it because I am not doing any updating on the client side. I just need to get the values to the controller... any help is appreciated.

<script>    
    $(document).ready(function () {
        $("#update").click(function() {
            var grid = $("#Grid").data("kendoGrid");
            var value = $("#Name").data("kendoDropDownList").value();
            var models = [];

            //find the selected models
            grid.tbody
                .find(":checked")
                .closest("tr")                
                .each(function () {
                    models.push(grid.dataItem(this));
                });

            //update the models value
            for (var i = 0, length = models.length; i < length; i++) {
                models[i].set("Name", value);
            }

            //submit the value to the server
            grid.dataSource.sync();
        });
    });
</script>
Rosen
Telerik team
 answered on 13 Sep 2012
1 answer
90 views
Hi have implemented a Grid using Open Access as the ORM.

The data displays fine as does completing updates. However if you add an item and save it, then every subsequent edit on existing items creates a new entry as each edit is behaving as a newly added Item.

The only way to stop this is to manually refresh the page.

Rob
Robert
Top achievements
Rank 1
 answered on 12 Sep 2012
0 answers
147 views
Hi,

I am using Asp.Net MVC Grid. Facing the issue in chrome, when i group the data on the basis of a single hidden column it shows that column even if the column header is hidden and not visible. Other browser has no issue in that. Kindly, guide me about it. 

Your earliest response will be highly appreciated.

Regards,
Muhammad Kamran

P.S. Attached is the snapsot of Chrome n firefox.
Muhammad
Top achievements
Rank 1
 asked on 12 Sep 2012
1 answer
156 views
Hi, 

I put input text inside splitter makes input text read-only...

Here's my code snippet...
Index VIEW:
@helper RenderContentSplitter()
    {
        @(Html.Kendo().Splitter()
            .Name("contentSplitter")
            .Orientation(SplitterOrientation.Vertical)
            .Panes(contentPanes =>
            {
                contentPanes.Add()
                    .Collapsible(true)
                    .HtmlAttributes(new { style = "height: 100%; width: 100%;", id = "pane1" })
                    .Resizable(true)
                    .Content(
                       Html.Action("RowDesignPartial").ToHtmlString()
                    );
            })
                )
    }


RowDesignPartial VIEW:

<input type="text" id="txtRowName" name="txtRowName" class="k-textbox" value="" />

Thanks.......
Dimo
Telerik team
 answered on 12 Sep 2012
6 answers
1.0K+ views
Hi,

How can I set focus on my added new row?
In my case, I insert new row at the bottom..

Thanks...
Steve Palm
Top achievements
Rank 1
 answered on 12 Sep 2012
5 answers
267 views
I'm trying to follow the examples that I've found, but I seem to be missing something that prevents my results from sorting or grouping or paging. I'm assuming that the problem is in the controller, probably in GetEducators but I can't figure out what it is that I'm missing!

Index.html
@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>
}

PersonSearchController.cs
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);
        }
    }
}

SearchResults.cshtml
@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

My model is from a DBContext template and Entity Framework, but it is below in case it's relevant:
tc_person.cs
//------------------------------------------------------------------------------
// <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 { getset; }
        public System.DateTime date_record_added { getset; }
        public string prefix { getset; }
        public string last_name { getset; }
        public string first_name { getset; }
        public string middle_name { getset; }
        public string suffix { getset; }
        public string preferred_name { getset; }
        public string maiden_name { getset; }
        public string aka { getset; }
        public string ethnic_code { getset; }
        public string gender { getset; }
        public Nullable<System.DateTime> dob { getset; }
        public Nullable<System.DateTime> deceased_date { getset; }
        public string citizenship { getset; }
        public string nclb_veteran { getset; }
        public Nullable<System.DateTime> ethics_test { getset; }
     
        public virtual ICollection<tc_experience> tc_experience { getset; }
        public virtual ICollection<tc_license> tc_license { getset; }
        public virtual ICollection<tc_certificate> tc_certificate { getset; }
    }
     
}

PersonSearch.Context.cs
//------------------------------------------------------------------------------
// <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 { getset; }
        public DbSet<tc_experience> tc_experience { getset; }
        public DbSet<tc_person> tc_person { getset; }
        public DbSet<tc_license> tc_license { getset; }
        public DbSet<tc_certificate> tc_certificate { getset; }
        public DbSet<tc_endorsement> tc_endorsement { getset; }
        public DbSet<tcc_license_level> tcc_license_level { getset; }
        public DbSet<tcc_license_status> tcc_license_status { getset; }
        public DbSet<tcc_qualified_by> tcc_qualified_by { getset; }
    }
}
Samuel
Top achievements
Rank 2
 answered on 11 Sep 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?