Telerik Forums
UI for ASP.NET MVC Forum
3 answers
63 views
I want to report two bugs in Q1 2014 SP2 release. I write demo to repro the scenario . The code is  attached.
(1) stockchart.  When I set missingValue = 'gap', and the chart data contain isolated point (a single point whose proceeding and succeeding points are both missing), when user mouse hover its legend, the chart throw exception. In my demo, when you click 'Microsoft' legend, exception occurs.
In the very early release version, this bug does not exist. I notice the bug happen since you add this new feature to chart: highlight data points when user mouse hover its legend.

(2) window. Just try my example. First close the window. Then click the button to open the window again. You will find that the text within the window can not be selected. This bug does not exist in the earlier release version. Now it exists in Chrome, Safari, although it works wells with IE.




T. Tsonev
Telerik team
 answered on 21 Jul 2014
3 answers
314 views
Hi, 

I have a Kendo tree view with three levels. Please see the attached file MyTree.jpg.

I have a leaf node's with text value "CHINA".  I am not able to get the leaf node's parent node text. Please see the attached file ChromeOutput.jpg. 

Please advise why undefined is returned for below -

treeview.text(treeview.parent(treeview.findByText("CHINA")))

Regards, 
Manoj



Alex Gyoshev
Telerik team
 answered on 21 Jul 2014
1 answer
376 views
My company is considering purchasing several licenses of Kendo UI Professional and UI for ASP.NET MVC.  I am using MVC 5 and the latest version of UI for ASP.NET MVC.  I am working with hierarchical data.   I am attempting to create the TreeView in the _Layout view and populate it with urls or action links.

My current code:

In the _Layout View:

@Html.Partial("_ProductTree")

"_ProductTree" Partial View

@(Html.Kendo().TreeView().Name("ProductTree")
    .DataSource(d => d
        .Model(m => m
            .Id("ProductId")
            .HasChildren("Categories"))
    .Read(r => r.Action("_ProductTree", "Home")))
    .DataTextField("ProductName"))

Action Method:

        [ActionName("_ProductTree")]
        public JsonResult GetProductTree()
        {
            var products = _productBusinessService.GetProducts();

            var result = products.Select(c => new
            {
                c.ProductID,
                c.ProductName,
                Categories= c.Categories.Any()
            }).OrderBy(t => t.ProductName);

            return Json(result, JsonRequestBehavior.AllowGet);
        }

I am having a number of issues:

1.  When I expand a parent node that has children, the TreeView is hitting the action method and appending the entire tree to the child, instead of just displaying the children.
2.  I need to be able to nest the TreeView two-deep, for example Product > Category > Type.
3.  I am trying to figure out how to aggregate or project the data using LINQ to do a two-deep higherarchy.
4.  I tried turning off LoadOnDemand but that made the TreeView call the action method once for each record in the Product list.

I have tried inserting the TreeView Razor code directly into the _Layout view (not using a partial view).   I realize that I may need to move the action method into a base controller class and inherit it in every controller to stop it from appending the list to the parent node. If I cant get this working soon, I may have to either use Kendo UI Professional or an open source alternative.

Thank you in advance for your help!
















Wayne
Top achievements
Rank 1
 answered on 19 Jul 2014
1 answer
159 views
I've an MVC application where I am trying to upgrade from 2013.1.514 to 2014.2.716.  My application has a custom LESS file that on the last line imports Template.less.

However, it appears this file is no longer in the src folder.

Has it simply been replaced by theme-template.less or am I going to have to rebuild my theme as best I can from my old file?
Alex Gyoshev
Telerik team
 answered on 18 Jul 2014
1 answer
149 views
So I set up a simple Kendo Grid, which I want to use to batch edit in cells etc. However when I click Add New Record the site redirects me to http://localhost:52536/Tag/Tag_Read/10322?grid-mode=insert with a page displaying a text list (json?) of my db entries. The in cell editing also doesn't work at all. 
I'll post my view and controller below. 


View:

@model IEnumerable<HoldAndRelease.Models.Tag>


<br />
<br />
<br />
@(Html.Kendo().Grid(Model) //Bind the grid to ViewBag.Products
      .Name("grid")
      .Columns(columns =>
      {
          // Create a column bound to the ProductID property
          columns.Bound(tag => tag.TagID);
          columns.Bound(tag => tag.ProductionDate);
          columns.Bound(tag => tag.CodeDate);
          columns.Bound(tag => tag.Amount);
          columns.Command(cmd => cmd.Edit());

      })
      .ToolBar(toolbar =>
      {
          toolbar.Create();
          toolbar.Save();
      })
      .Pageable()
      .Navigatable()
      .Sortable()
      .Scrollable()
      .DataSource(datasource =>
          datasource
          .Ajax()
          .Batch(true)
          .PageSize(10)
          .ServerOperation(false)
          .Events(events => events.Error("error_handler"))
          .Model(model =>
          {
              model.Id(tag => tag.TagID);
              model.Field(tag => tag.TagID).Editable(false);
          })
          .Create(create => create.Action("Tag_Create", "Tag"))
          .Read(read => read.Action("Tag_Read", "Tag"))
          .Update(update => update.Action("Tag_Update", "Tag"))
          ).Editable(editable => editable.Mode(GridEditMode.InCell))
)

<script type="text/javascript">
    function error_handler(e) {
        if (e.errors) {
            var message = "Errors:\n";
            $.each(e.errors, function (key, value) {
                if ('errors' in value) {
                    $.each(value.errors, function () {
                        message += this + "\n";
                    });
                }
            });
            alert(message);
        }
    }
</script>

Controller:

public ActionResult Tag_Read([DataSourceRequest]DataSourceRequest request)
        {
            db.Configuration.ProxyCreationEnabled = false;
            IQueryable<Tag> tags = db.Tags;
            DataSourceResult result = tags.ToDataSourceResult(request);
            return Json(result, JsonRequestBehavior.AllowGet); 
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Tag_Create([DataSourceRequest]DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<Tag> tags)
        {
            db.Configuration.ProxyCreationEnabled = false;
            var entities = new List<Tag>();
            if (ModelState.IsValid)
            {
                foreach (var tag in tags)
                {
                  
                    var entity = new Tag
                    {
                        ProductionDate = tag.ProductionDate,
                        CodeDate = tag.CodeDate,
                        Amount = tag.Amount
                    };

                    db.Tags.Add(entity);

                    entities.Add(entity);
                }

                db.SaveChanges();
            }

            return Json(entities.ToDataSourceResult(request, ModelState, tag => new Tag 
            {
                TagID = tag.TagID,
                ProductionDate = tag.ProductionDate, 
                CodeDate = tag.CodeDate,
                Amount = tag.Amount
            }), JsonRequestBehavior.AllowGet);
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Tag_Update([DataSourceRequest]DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<Tag> tags)
        {
            db.Configuration.ProxyCreationEnabled = false;
            var entities = new List<Tag>();
            if (ModelState.IsValid)
            {
                foreach (var tag in tags)
                {
                    var entity = new Tag
                    {
                        ProductionDate = tag.ProductionDate,
                        CodeDate = tag.CodeDate,
                        Amount = tag.Amount
                    };

                    entities.Add(entity);

                    db.Tags.Attach(entity);

                    db.Entry(entity).State = EntityState.Modified;
                }
                
                db.SaveChanges();
            }

            return Json(entities.ToDataSourceResult(request, ModelState, tag => new Tag
            {
                TagID = tag.TagID,
                ProductionDate = tag.ProductionDate,
                CodeDate = tag.CodeDate,
                Amount = tag.Amount
            }), JsonRequestBehavior.AllowGet);
        }
Daniel
Telerik team
 answered on 18 Jul 2014
8 answers
717 views
I need to change a filterDescriptors member from FranchiseeName to Franchisee.Name.
Note that the field is "Name" from a related included table called Franchisee

so far I have
If request.Filters.Any() Then
              If request.Filters.Any(Function(y) CType(y, Kendo.Mvc.FilterDescriptor).Member.Equals("FranchiseeName")) Then
                  Dim filter As FilterDescriptor = request.Filters.Single(Function(g) CType(g, Kendo.Mvc.FilterDescriptor).Member.Equals("FranchiseeName"))
                  request.Filters.Add(New Kendo.Mvc.FilterDescriptor With {.Member = "Franchisee.Name", .Value = filter.Value.ToString})                      
                  request.Filters.Remove(filter)
              End If


but this does not work. It adds the descriptor and removes old descriptor as planed without error but query fails. 

in this post I see a simple field change can be achieved. but in my case this does not work.
http://www.telerik.com/forums/how-to-access-datasourcerequest-filters-in-controller-

Any ideas, Thanks
Alan Mosley
Top achievements
Rank 1
 answered on 18 Jul 2014
0 answers
155 views
The Windows Installer packages for the Q2 2014 release (v.2014.2.716) contain outdated TypeScript and VSDOC definitions.
The ZIP packages are not affected. Future service versions will be free of this defect.

Attached is the reference version from the ZIP versions.

Please accept our apologies for the caused inconvenience.
Kendo UI
Top achievements
Rank 1
 asked on 18 Jul 2014
3 answers
973 views
I have been using Kendo to drawing charts at the web client side.  However, sometimes I need draw chart on the server side(MVC project). E.g., I would like to generate a chart as image then send it in a report email. Can Kendo support generating chart all by server with C# code?  I find highchart have this feature http://www.highcharts.com/component/content/article/2-articles/news/52-serverside-generated-charts
Thanks in advance.
T. Tsonev
Telerik team
 answered on 18 Jul 2014
1 answer
441 views
In the example below, how can I restrict a user from entering more than 5 decimals in the textbox? 


@(Html.Kendo().NumericTextBox<decimal>()
 .Name("maxVarianceAmount")
 .HtmlAttributes(new { style = "width:75px" })
 .Format("c5")
 .Min(0)
 .Value(@ViewBag.MatchProcessor.VarianceAmount)
 .Decimals(5)
 .Spinners(false)
 ) 
Georgi Krustev
Telerik team
 answered on 18 Jul 2014
1 answer
143 views
We want to modify the default template of the popup mini calender/date calender of the kendo scheduler. How can we get the instance of this calender component within this scheduler ?
Vladimir Iliev
Telerik team
 answered on 18 Jul 2014
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
ColorPicker
DateRangePicker
Security
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?