Telerik Forums
Kendo UI for jQuery Forum
2 answers
90 views
Ok... frustratingly this is the second time I'm writing this as the first post failed for some reason.

I know there is a similar post to this here, http://www.telerik.com/forums/stacked-column-chart-where-group-is-a-property but the example code looks nothing like the api documentation, so hopefully someone can explain what's wrong with mine.  The grouping is missing the first day completely!

Json looks like:
[{"tdate": "2014-03-18T00:00:00", "data": 652.48 , "CatName": "Starters"},{"tdate": "2014-03-18T00:00:00", "data": 1245.87 , "CatName": "Spirits"},{"tdate": "2014-03-21T00:00:00", "data": 326.55 , "CatName": "Beers"},{"tdate": "2014-03-22T00:00:00", "data": 124.28 , "CatName": "Beers"},{"tdate": "2014-03-24T00:00:00", "data": 785.24 , "CatName": "Starters"},{"tdate": "2014-03-24T00:00:00", "data": 444.74 , "CatName": "Beers"},{"tdate": "2014-03-24T00:00:00", "data": 345.54 , "CatName": "Spirits"}]

HTML
<div id="chart"></div>

Script:
var myTheme = 'metro';

var myds = $('#MainContent_hdn1').val();
var jsondata = $.parseJSON(myds);

var mydatasource = new kendo.data.DataSource({
group: [
{ field: "CatName" }
],
sort: { field: "tdate", dir: "asc" },
data: jsondata
});

$("#chart").kendoChart({
dataSource: mydatasource,
series: [{
field: "data"
}],
group: { field: "CatName" },
categoryAxis: {
field: "tdate",
baseUnit: 'day',
type: 'date',
majorGridLines: {
visible: false
},
line: {
visible: false
}
},
seriesDefaults: {
stack: true
},
chartArea: {
height: 250
},
theme: myTheme,
tooltip: {
visible: true,
template: "#= series.name #: #= value #"
}
});

Output looks like attached pic.
Iliana Dyankova
Telerik team
 answered on 25 Mar 2014
2 answers
562 views
I'm trying to hook up the new locked column functionality, and having some odd display behavior with my footers.  It looks like the footer of non-locked columns are wrapping around underneath the locked footers instead of showing under the appropriate columns.  I was able to reproduce this with the demo page by adding footer templates to the columns there (which can be seen below).  Is this a bug or something that is not supported?  In my case, I have some columns where I want to show the sum of the data in the footer if possible.  Thanks for your help!

Regards,
Brian

<!DOCTYPE html>
<html>
<head>
    <title>Frozen columns</title>
    <meta charset="utf-8">
    <link href="../../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../../../styles/kendo.rtl.min.css" rel="stylesheet">
    <link href="../../../styles/kendo.default.min.css" rel="stylesheet">
 
    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.web.min.js"></script>
    <script src="../../content/shared/js/console.js"></script>
    <script>
         
    </script>
     
     
</head>
<body>
     
        <a class="offline-button" href="../index.html">Back</a>
     
    <div id="example" class="k-content">
    <div id="grid"></div>
 
    <script>
        $(document).ready(function() {
            $("#grid").kendoGrid({
                dataSource: {
                    type: "odata",
                    transport: {
                        read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders"
                    },
                    schema: {
                        model: {
                            fields: {
                                OrderID: { type: "number" },
                                ShipCountry: { type: "string" },
                                ShipName: { type: "string" },
                                ShipCity: { type: "string" },
                                ShipAddress: { type: "string" }
                            }
                        }
                    },
                    pageSize: 30
                },
                height: 430,
                sortable: true,
                reorderable: true,
                groupable: true,
                resizable: true,
                filterable: true,
                columnMenu: true,
                pageable: true,
                columns: [ {
                        field: "OrderID",
                        title: "Order ID",
                        locked: true,
                        lockable: false,
                        width: 120,
                        footerTemplate: "Order ID"
                    }, {
                        field: "ShipCountry",
                        title: "Ship Country",
                        width: 200,
                        footerTemplate: "Ship Country"
                    }, {
                        field: "ShipCity",
                        title: "Ship City",
                        width: 160,
                        footerTemplate: "Ship City"
                    },{
                        field: "ShipName",
                        title: "Ship Name",
                        locked: true,
                        width: 200,
                        footerTemplate: "Ship Name"
                    },  {
                        field: "ShipAddress",
                        lockable: false,
                        width: 300,
                        footerTemplate: "Ship Address"
                    }
                ]
            });
        });
        </script>
</div>
 
     
             
</body>
</html>

Brian Roth
Top achievements
Rank 1
 answered on 25 Mar 2014
2 answers
127 views
I am finding it impossible to use the Chrome Developers debugger today. The issue is constant DOM errors of the form:

event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

Coming from jquery-1.9.1 

This is fixed in newer versions of jquery,

But I am using Kendo UI Complete v2013.3.1324 and that comes with 1.9.1

Suggestions?

using Chrome 33.0.1750.154 m


Dr.YSG
Top achievements
Rank 2
 answered on 25 Mar 2014
7 answers
116 views
I have some footer tabs that are typically a green/brown color depending on their selection status. They have an icon as well as some text below them.

On the windows simulator, however, the icons are white and only the text changes color correctly. Also, every now and then the icons all turn black instead of white.
Michael
Top achievements
Rank 1
 answered on 25 Mar 2014
1 answer
111 views
I'm using data binding with MVVM for my grid and am trying to apply a custom filter but it doesn't seem to be picking it up am I doing something wrong?

data-filterable="extra: false, operators: { string: { startswith: 'starts with', eq: 'Is equal to' , neq: 'Is not equal to' } }"
Alexander Valchev
Telerik team
 answered on 25 Mar 2014
3 answers
144 views
Do the Kendo UI Data Viz javascript APIs for the chart, sparklines, etc support updates to the underlying data source? For example, I'm going to have a JavaScript data source for a scatter plot and when the data source array is updated, I'd like the charts to reload the data and animate the points into the new position. Is this something Kendo supports?
Iliana Dyankova
Telerik team
 answered on 25 Mar 2014
1 answer
390 views
I have a kendo editor control which is used to edit text containing <br> tags for newlines.  The text is long, causing the editor to show a scroll bar.  To preserve compatibility with existing data, I have overridden the newline command to insert <br> tags instead of paragraphs:

      $("#txtEditor").kendoEditor({
        tools: [
          { name: "insertLineBreak", shift: false },
        ]
      });

This works fine, except that when I do this and insert a new line near the top, now the editor scrolls to the end of the text block, which makes the scroll bar jump down.  Is there any way to avoid this happening?

I am using Kendo UI Complete v2013.3.1119 and the JQuery version it came with, Windows 7, tested in Firefox 27.  I can replicate this in the demo on the Kendo site as well by inserting some text and using shift+enter to insert some new lines.
Dimo
Telerik team
 answered on 25 Mar 2014
5 answers
622 views
I added a row manually to a hierarchical kendo grid, where the new row is added to the child kendo grid row after the parent row is expanded. It opens up the popup editor and closes immediately.

Here's the Hierarchy template and the parent grid. The onHierarchy1Save occurs when a new Hierarchy1 is added to the database, it expands the row which makes the Hierachy2 grid to show up, get the Hierarchy2 grid and inserts a new row to it. This opens up a popup editor which gets cancelled immediately without adding any new row to it.

    @(Html.Kendo().Grid<Heirarchy>()
              .Name("Hierarchy1")
              .Columns(c =>
              {
                  c.Bound(h => h.Name).Title("Name");
                  c.Command(command => command.Edit()).Width(90);
              })
              .Editable(editable =>
              {
                  editable.Mode(GridEditMode.PopUp);
                  editable.Window(window => window.Title("Edit Details").Width(500));
              })
              .ToolBar(toolbar => toolbar.Create().Text("Add new hiearchy2"))
              .DataSource(dataSource => dataSource.Ajax()
                  .Model(model => model.Id(div => div.primaryKey1))
                  .Batch(true)
                  .Read("GetHierarchies1", "Home")
                  .Update("UpdateHierachies1", "Home")
                  .Create("CreateHierarchies1", "Home")
              )
              .Navigatable()
              .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
              .ClientDetailTemplateId("Hierarchy2Template")
              .Events(events => events.Save("onHierarchy1Save")))


    <script id="Hierarchy2Template" type="text/kendo-tmpl">
        @(Html.Kendo().Grid<Hierarchy2>()
              .Name("Hierarchy2Grid_#=primaryKey1#")
              .Columns(columns =>
              {
                  columns.Bound(h => h.Name).Width(150);
                  columns.Command(command => command.Edit()).Width(90);
              })
              .Editable(editable =>
              {
                  editable.Mode(GridEditMode.PopUp);
                  editable.Window(window => window.Title("Edit Details").Width(500));
              })
              .ToolBar(toolbar => toolbar.Create().Text("Add new hierarchy2"))
              .DataSource(dataSource => dataSource
                  .Ajax()
                  .PageSize(5)
                  .Batch(true)
                  .Model(model => model.Id(h => h.primaryKey2))
                  .Read(read => read.Action("GetHierarchy2", "Home", new {foreignKey = "#=primaryKey1#"}))
                  .Update("UpdateHierarchy2", "Home")
                  .Create("CreateHierarchy2", "Home", new {foreignKey = "#=primaryKey1#"})
              )
              .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
              .ToClientTemplate())
    </script>

    function onHierarchy1Save(e) {
            e.preventDefault();
            this.saveChanges();
            if (!e.model.Id) {
                if (confirm("Do you want to add a new hierarchy2?")) {
                    this.expandRow(this.tbody.find("tr.k-master-row").first());
                    var primaryKey1 = e.model.primaryKey1;
                    var grid = $('#Hierarchy2Grid_' + primaryKey1).data("kendoGrid");
                    grid.addRow();
                }
            }
        }
Richard
Top achievements
Rank 1
 answered on 25 Mar 2014
9 answers
228 views
I have a problem with using the switch widget in. When I set the data-enable="false" in the switch and run the program. The switch can still be set on or off.  I thought the enable="false" option should disable that feature? I have tried running it on iphone with ios 7 and android 4.2 and they both have this problem. Can anyone help?
Kiril Nikolov
Telerik team
 answered on 25 Mar 2014
1 answer
159 views
I need an option to close the menu when mouse moves out of menu, and open the menu on click.
We have a four level deep menu structure. If I set 'openOnClick' as true, the menu does not get closed on mouse out.

How can this be achieved?
Alexander Valchev
Telerik team
 answered on 25 Mar 2014
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?