Telerik Forums
Kendo UI for jQuery Forum
3 answers
182 views
Hi,

How can we export a grid data to excel using Kendo grid for Angular?
Alexander Popov
Telerik team
 answered on 11 Feb 2015
1 answer
3.7K+ views
Hi,
Is the option available to show an upload control inside a Grid cell? if not, that is doable through editing template. However, when submitting the data, how will the DataSource handle that?

Thanks
Genady Sergeev
Telerik team
 answered on 11 Feb 2015
1 answer
253 views
We are building a complex application that utilizes AngularJS for our Javascript and SPA framework, and using the Kendo UI controls for rich UI. Obviously, we are using the built-in AngularJS directives to render the Kendo components.

The problem is that we are encountering memory leaks when switching between views in the SPA, and these seem to be related to Kendo. The heap size keeps growing after every page that is navigated to, meaning that the components aren't being completely cleaned up when the view (and $scope) is being destroyed. 

For example, if we start at page A, navigate to page B, and then back to A, we can see in Chrome's Memory Heap Profile that Kendo is leaving behind a Detached DOM Tree for components in page B (see http://i.imgur.com/S2BlbKT.png). If I drill down into one of these trees, you can clearly see that these are Kendo widgets which are being left behind because of javascript references which are left behind (see http://i.imgur.com/tQ96CAz.png).

Further, looking at the page HTML, we can see that for widgets such as the Combobox and DatePicker, Kendo is leaving behind "k-list-container" divs in the DOM which are accumulating at the bottom of the SPA's html and are not being removed when a view is being unloaded / $scope is being destroyed (see http://i.imgur.com/hJWxlAq.png).

We've tried manually calling kendo.destroy(angular.element('#container')) when the $scope is being destroyed, however this doesn't seem to help at all with getting rid of the extra DOM elements or with freeing up the Javascript references to the widgets.

Aren't the widgets, when used in conjunction with the AngularJS directives, supposed to automatically clean themselves up when the $scope is destroyed?If not, please let me know how we can effectively unload the widgets so that we don't have traces of them left behind when we navigate from page to page.
DaveJ
Top achievements
Rank 1
 answered on 11 Feb 2015
6 answers
550 views

I followed the instructions here:
http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/introduction

But, I am still getting the following error:
0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'kendoDatePicker'

I think the problem is related to something VS2012 does when creating a Web Application for Mobile devices.

Here are the basic steps I followed:
Open VS 2012 > New Project > ASP.NET MVC 4 Web Application > Mobile Application > Then followed all the MVC 4 steps here (http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/introduction)

Any help will be appreciated. My code is below.

BundleConfig.cs:

using System.Web;
using System.Web.Optimization;
 
namespace KendoMobileApp
{
    public class BundleConfig
    {
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-1.*"));
 
            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                        "~/Scripts/jquery-ui*"));
 
            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/jquery.validate*"));
 
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));
 
            bundles.Add(new ScriptBundle("~/bundles/jquerymobile").Include("~/Scripts/jquery.mobile*"));
 
            bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
 
            bundles.Add(new StyleBundle("~/Content/mobilecss").Include("~/Content/jquery.mobile*"));
 
            bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                        "~/Content/themes/base/jquery.ui.core.css",
                        "~/Content/themes/base/jquery.ui.resizable.css",
                        "~/Content/themes/base/jquery.ui.selectable.css",
                        "~/Content/themes/base/jquery.ui.accordion.css",
                        "~/Content/themes/base/jquery.ui.autocomplete.css",
                        "~/Content/themes/base/jquery.ui.button.css",
                        "~/Content/themes/base/jquery.ui.dialog.css",
                        "~/Content/themes/base/jquery.ui.slider.css",
                        "~/Content/themes/base/jquery.ui.tabs.css",
                        "~/Content/themes/base/jquery.ui.datepicker.css",
                        "~/Content/themes/base/jquery.ui.progressbar.css",
                        "~/Content/themes/base/jquery.ui.theme.css"));
 
 
 
 
 
            // The jQuery bundle
            //bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
            //                "~/Scripts/jquery-1.*"));
 
 
            // The Kendo JavaScript bundle
            bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
                    "~/Scripts/kendo.web.*", // or kendo.all.* if you want to use Kendo UI Web and Kendo UI DataViz
                    "~/Scripts/kendo.aspnetmvc.*"));
 
 
            // The Kendo CSS bundle
            bundles.Add(new StyleBundle("~/Content/kendo").Include(
                    "~/Content/kendo.common.*",
                    "~/Content/kendo.default.*"));
 
 
            // Clear all items from the default ignore list to allow minified CSS and JavaScript files to be included in debug mode
            bundles.IgnoreList.Clear();
 
 
            // Add back the default ignore list rules sans the ones which affect minified files and debug mode
            bundles.IgnoreList.Ignore("*.intellisense.js");
            bundles.IgnoreList.Ignore("*-vsdoc.js");
            bundles.IgnoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
 
        }
    }
}

_Layout.cshtml
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>@ViewBag.Title</title>
        <meta name="viewport" content="width=device-width" />
        <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        @Styles.Render("~/Content/mobileCss", "~/Content/css")
        @Scripts.Render("~/bundles/modernizr")
        @Styles.Render("~/Content/kendo")
        @Scripts.Render("~/bundles/jquery")
        @Scripts.Render("~/bundles/kendo")
 
    </head>
    <body>
        <div data-role="page" data-theme="b">
            <div data-role="header">
                <h1>@ViewBag.Title</h1>
            </div>
            <div data-role="content">
                @RenderBody()
            </div>
        </div>
 
        @Scripts.Render("~/bundles/jquery", "~/bundles/jquerymobile")
        @RenderSection("scripts", required: false)
    </body>
</html>

HomeController.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
 
namespace KendoMobileApp.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
 
            return View();
        }
 
        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";
 
            return View();
        }
 
        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";
 
            return View();
        }
    }
}

Index.cshtml:
@{
    ViewBag.Title = "Home Page";
}
 
<h2>@ViewBag.Message</h2>
@(Html.Kendo().DatePicker().Name("Birthday"))
<p>
    To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc<;/a>.
</p>
 
<ul data-role="listview" data-inset="true">
    <li data-role="list-divider">Navigation</li>
    <li>@Html.ActionLink("About", "About", "Home")</li>
    <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>

steven
Top achievements
Rank 1
 answered on 11 Feb 2015
3 answers
489 views
Hi,
We are hitting a scenario where the validation messages for an input field in a grid popup editor is not being removed when a valid value is entered. This can be replicated using the standard popup demo.

Popup editing demo

To replicate this you
- Click on add new record
- Delete the Units in Stock and press tab (you get the UnitsInStock is required error)
- Set the Units in Stock back to 1 (the default value) and press tab

The validation message is still shown even though the value is now correct. This only seems to happen if you set the value back to what it was before you deleted it. If you do the same steps above but change the number to 2 in the third step the message is removed correctly.

Is this a bug or is there anything we can do to force the validation to execute again and clear the message?
Stan
Top achievements
Rank 1
 answered on 11 Feb 2015
1 answer
505 views
Hello, how do you select the next node, given that you have the selected node?  How do you select the previous item?

The treeview is loaded from a HierarchicalDataSource.

I get the selected node like this:
var treeview= $(treeid);
var tree = treeview.data('kendoTreeView');
var selectedNode = tv.select();

any help is appreciated,

Thanks.
Coty
Top achievements
Rank 1
 answered on 10 Feb 2015
1 answer
207 views
Hello all,

I'm trying to bind my data (web api using entity framework 6) but still the generated chart shows no data only title and chart area.

I have something similier to this code:

<script type="text/javascript">
function createChart() {
$("#chart").kendoChart({
dataSource: {
transport: {
read: {
url: "http://localhost:*****/api/ISLFWs",
dataType: "json"
}
},
sort: {
field: "Year",
dir: "asc"
}
},
title: {
text: "Test"
},
legend: {
position: "top"
},
seriesDefaults: {
type: "column"
},
series:
[{
field: "ActualPSE",
name: "Actual PSE"
}, {
field: "TargetPSE",
name: "Target PSE"
},

{

}],
categoryAxis: {
field: "Year",
labels: {
rotation: -90
},
majorGridLines: {
visible: false
}
},
valueAxis: {
labels: {
format: "N0"
},
majorUnit: 10000,
line: {
visible: false
}
},
tooltip: {
visible: true,
format: "N0"
}
});
}

$(document).ready(createChart);
$(document).bind("kendo:skinChange", createChart);

</script>
Genady Sergeev
Telerik team
 answered on 10 Feb 2015
1 answer
111 views
Hi,

Is there a way to make one or more columns uneditable/readonly on an Grid that already has editable option enabled, and that it when trying to edit a row?

Your help is much appreciated.

Regards,
Kris
Nikolay Rusev
Telerik team
 answered on 10 Feb 2015
1 answer
120 views
In version 2014.3.1119 of Kendo UI I have a problem passing date value from view to controller, the  value passed to controller is {01/01/0001 12:00:00 a.m.}, however with the previous (2013.3.1119) version works as expected.

this my code inside parameterMap

for (var member in KPIDataEntry) {
          if (member == "Date") {
               result["KPIDataEntry[" + i + "]." + member] = kendo.toString(new Date(KPIDataEntry[member]), "G");
          }
          else {
              result["KPIDataEntry[" + i + "]." + member] = KPIDataEntry[member];
         }
}

thanks in advanced, and sorry about my english
Vladimir Iliev
Telerik team
 answered on 10 Feb 2015
2 answers
131 views
Hi,

we're having trouble rendering nice Candlestick chart in some cases.

Specifically, for some values passed, chart is not "zoomed" in to better see difference between points but rendered from the '0' on value axis instead. For other cases, it's behaving as expected. To better illustrate, please see following dojo: http://dojo.telerik.com/AnOhe and see that value axis starts from '0' where it could start from '18' for example.

Is there a way to force chart to do this, instead of calculating valueAxis.max and valueAxis.min manually?

Thanks,

Dragan
Dragan
Top achievements
Rank 1
 answered on 10 Feb 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
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?