Telerik Forums
Kendo UI for jQuery Forum
1 answer
62 views
It took me a full day to realize it was the way Kendo was perceiving the data and not something I was doing, to come to the conclusion that Pie charts will not display properly if the data handed to it is in a string format, however all other charts are fine. I've been working on a dashboard and passing all data to the browser in the same manner until I tried drawing pie charts. This is more of a "in-case anyone comes across this issue" or even something for the Telerik team to put in as a fix, but I made a jsbin example to demonstrate the problem

http://jsbin.com/anezec/2/edit

I'm just curious as to why the lines have no problem display but the pie charts do?
Hristo Germanov
Telerik team
 answered on 18 Jun 2013
2 answers
2.9K+ views
Hello,

I'm working on implementing a stacked bar chart solution with one vertical column, but would like to increase the width of this vertical bar to fill the entire chart container it resides in (see screenshot).  Is there a way to increase just the width of this bar?

This is my JS:

function createChart() {
                    $("#chart").kendoChart({
chartArea: {
background:"#f3f3f3",
margin:0,
padding:0
},

                      legend: {
                            visible: false,

},
                        seriesDefaults: {
                            type: "column",
stack: true,
width:90
},

series: [{
name: "Interest",
                            stack: "Mortgage",
                            data: [494.50],
color: "#f58025",
width:90
                        }, {
                            name: "Taxes",
                            stack: "Mortgage",
                            data: [375],
color: "#f58025"
                        }, {
                            name: "Principle",
                            stack: "Mortgage",
                            data: [269],
color: "#f58025"
                        }, {
                            name: "PMI",
                            stack: "Mortgage",
                            data: [200],
color: "#f58025"
                        }, {
                            name: "Rollover",
                            stack: "Mortgage",
                            data: [75],
color: "#f58025"
                      
                         }, {
                            name: "Insurance",
                            stack: "Mortgage",
                            data: [50],
color: "#f58025"
}],
                        valueAxis: {
color:"#ff0000",
max:1450,

labels:{
color:"",
visible:false
},
line: {
                                visible: false
                            },
majorGridLines: {
                                visible: false
                            },

                        },
                        categoryAxis: {
color:"",
justified:true,
categories: ["Ex"],
width:2,
                            

majorGridLines: {
                                visible: false
                            },
crosshair: {
 width: 2,
 visible: true
},
},
                        tooltip: {
                            visible: true,
                            template: "#= series.name #: #= ['$']+value #"
                        }
                    });
                }



Thank you!
Randy
Top achievements
Rank 1
 answered on 18 Jun 2013
7 answers
631 views
Hi,

I have been using kendo treeview to display Menu.
Below is my tree view
$("#treeview").kendoTreeView({
                template: '# if(item.isOvr) { # <b>#=item.txt#</b># } else { ##=item.txt## }#',
                select: function (e) {
                    if (this.dataItem(e.node) != null) {
                        this.expand(e.node);
                    }
                },
                dataSource: inlineDefault
            });

var inlineDefault = new kendo.data.HierarchicalDataSource({
                transport: {
                    read: {
                        cache: false,
                        url: "/menu/GetTree",
                        dataType: "json",
                        data: { 'id': $('#menuId').val(), 'netId': $('#networkId').val(), 'breakcache': new Date().getTime() }
                    }
                },
                schema: {
                    model: {
                        id: "id",
                        children: "Items",
                    }
                }
            });

Each Item have following properties:

var item = {
                id: id,
                actualid: actaulId,
                typ: menutype,
                prnt: parent,
                txt: text,
                isOvr: isOverride
            };

How Can I update all the properties of a single node? 
or refresh all the children from database of particular node.
Daniel
Telerik team
 answered on 18 Jun 2013
3 answers
426 views
I have a kendo grid for user managment when I go  to edit a user fields that are nullable byte keep on saying that the fields are required if i don't select a value for them.

Here is my view code for these and model.

<div class="phoneNumberEntry">
                    <div class="phoneModalDropdown">@Html.DropDownListFor(model => Model.Phone1.PhoneTypeId, ViewBag.PhoneTypeList1 as SelectList, new { @style = "width: 105px" })</div>
                    <span class="phoneNumber">@Html.EditorFor(model => Model.Phone1.PhoneNumber)</span>
                    <span class="extension">@Html.EditorFor(model => Model.Phone1.PhoneExtension)</span>
                    <span class="isPrimary">Primary: <input type="checkbox" data-bind="checked: Phone1.IsPhonePrimary"/></span>
                </div>
 
                <div class="phoneNumberEntry">
                    <div class="phoneModalDropdown">@Html.DropDownListFor(m => m.Phone2.PhoneTypeId, ViewBag.PhoneTypeList2 as SelectList, "Select Type", new { @style = "width: 105px" })</div>
                    <span class="phoneNumber">@Html.EditorFor(model => Model.Phone2.PhoneNumber)</span>
                    <span class="extension">@Html.EditorFor(model => Model.Phone2.PhoneExtension)</span>
                    <span class="isPrimary">Primary: <input type="checkbox" data-bind="checked: Phone2.IsPhonePrimary"/></span>
                </div>
 
                <div class="phoneNumberEntry">
                    <div class="phoneModalDropdown">@Html.DropDownListFor(m => m.Phone3.PhoneTypeId, ViewBag.PhoneTypeList3 as SelectList, "Select Type", new { @style = "width: 105px" })</div>
                    <span class="phoneNumber">@Html.EditorFor(model => Model.Phone3.PhoneNumber)</span>
                    <span class="extension">@Html.EditorFor(model => Model.Phone3.PhoneExtension)</span>
                    <span class="isPrimary">Primary: <input type="checkbox" data-bind="checked: Phone3.IsPhonePrimary"/></span>
                </div>
 
public class PhoneType
    {
        public string PhoneTypeDesc
        { get; set; }
        public byte? PhoneTypeId
        { get; set; }
    }
Petur Subev
Telerik team
 answered on 18 Jun 2013
1 answer
43 views
Hi,

I have a
drag and drop treeview and on the drop event I would like to verify if we are
droping over a node. If we do, force the node to drop after that node?

The result
would then be: When people drop an element on another element it would just
appear under the node and not as it's child.

 

Thank you

Petur Subev
Telerik team
 answered on 18 Jun 2013
1 answer
1.3K+ views
Hello,

I have 9 DropDownListFor that cascades from other DropDownList. I need to disable validation for DropDownLists that has no items. How to do it ?
Alexander Valchev
Telerik team
 answered on 18 Jun 2013
1 answer
62 views
An example line from my code:

$("#action-results-grid").data("kendoGrid").setDataSource(myDataSource);

How can I find a reference for the '.data("widget")' function, I have searched everywhere.

The examples clearly display how this function is used, but not once was it introduced in the tutorial documentation with a summary of it's functionality and why it is used.

My naive guess is that it returns an object wrapping the HTML element to provide methods associated with the widget, but still I would love to see a reference for this function to better understand how/when to use it and precisely what it does.

I can not find a reference to it in the API documentation.

Cheers,
Ross

Atanas Korchev
Telerik team
 answered on 18 Jun 2013
1 answer
120 views
Hi - the Kendo UI library does not work at all with Windows 8.  When attempting to add support to the project I get this javascript error:

Unhandled exception at line 3, column 12463 in ms-appx://2a623c8f-d20a-4b04-af23-abe9529a9b8d/js/jquery.min.js0x800c001c - JavaScript runtime error: Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property to add script or malformed HTML will generate this exception. Use the toStaticHTML method to filter dynamic content, or explicitly create elements and attributes with a method such as createElement.  For more information, see http://go.microsoft.com/fwlink/?LinkID=247104.

This seems to be an issue with the jquery library being used, but Kendo UI requires version 1.9.1 so I cannot upgrade the jquery library.  Any fixes that will allow Kendo UI to be used within a Windows 8 app?

Thanks!
Atanas Korchev
Telerik team
 answered on 18 Jun 2013
3 answers
263 views
In this example: http://demos.kendoui.com/web/grid/detailtemplate.html how would you add a slide down animation to the detail row template so it isn't just BANG there?
Kate | D-Flo
Top achievements
Rank 1
 answered on 17 Jun 2013
3 answers
120 views
I am implementing a TreeView within a modal window.  The window works fine the first time it is initialized within its containing razor view.  But whenever the containing razor view is reloaded due to user navigation, I get the attached JavaScript exception within the _attachUids function shown below when the TreeView attempts its ajax call (LoadContentFrom) to my partial view.  Any insight is appreciated as I am still fairly new to the TreeView.

_attachUids:function(t,n){var i,r=this,o=u.attr("uid");t=t||r.root,n=n||r.dataSource,i=n.view(),t.children("li").each(function(t,n){n=e(n).attr(o,i[t].uid),n.attr("role","treeitem"),r._attachUids(n.children("ul"),i[t].children)})}
n=e(n).attr(o,i[t].uid) is the statement that faults with:

t = 0
i[t] = undefined
o = "data-uid"

My Partial View Is:

<script type="text/javascript">
    function onWSBrowseOK() {
        $("#WSBrowseWindow").data("kendoWindow").close();
    }
 
    function onWSBrowseCancel() {
        $("#WSBrowseWindow").data("kendoWindow").close();
    }
 
    function getParentWorkspace() {
        var parentId = 0;
        var treeView = $("#WSBrowseTreeView").data("kendoTreeView");
        if (treeView != null) {
            var selNode = treeView.select();
            if (selNode != null) {
                var dataItem = treeView.dataItem(selNode);
                if (dataItem != null) {
                    parentId = dataItem.id;
                }
            }
        }
        return { workspace_id: parentId };
    }
 
    function onWSBrowseChange(e) {
        var treeView = $("#WSBrowseTreeView").data("kendoTreeView");
        var selNode = treeView.select();
        var fileView = $("#WSBrowseFileTreeView").data("kendoTreeView");
        fileView.dataSource.read();
        e.preventDefault();
    }
</script>
 
<style>
    #WSBrowseButtons {
        text-align: center;
    }
 
        #WSBrowseButtons button {
            margin-top: 10px;
            margin-bottom: 10px;
            margin-right: 20px;
        }
</style>
 
@(Html.Kendo().Splitter()
    .Name("WorkspaceBrowser")
    .Orientation(SplitterOrientation.Horizontal)
    .Panes(vPanes =>
        {
            vPanes.Add()
                .HtmlAttributes(new { id = "WSBrowsePane" })
                .Scrollable(false)
                .Collapsible(false)
                .Resizable(true)
                .Size("50%")
                .Content(
                    Html.Kendo().TreeView()
                        .Name("WSBrowseTreeView")
                        .HtmlAttributes(new { style = "height: 100%; width: 100%;" })
                        .Events(events => events
                            .Change("onWSBrowseChange")
                            )
                        .DataSource(ds => ds
                            .Read(read => read.Action("GetWorkspaces", "Workspace"))
                            )
                        .ToHtmlString()
                );
 
            vPanes.Add()
                .HtmlAttributes(new { id = "WSFilePane" })
                .Scrollable(false)
                .Collapsible(false)
                .Content(
                    Html.Kendo().TreeView()
                        .Name("WSBrowseFileTreeView")
                        .HtmlAttributes(new { style = "height: 100%; width: 100%;" })
                        .DataSource(ds => ds
                            .Read(read => read.Action("WorkspaceFiles", "Workspace").Data("getParentWorkspace"))
                            )
                        .ToHtmlString()
                );
                 
        })
)
<div id="WSBrowseButtons">
    <button id="WSBrowseOK" onclick="onWSBrowseOK();">OK</button>
    <button id="WSBrowseCancel" onclick="onWSBrowseCancel();">Cancel</button>
</div>
The modal window container is defined as follows:

@(Html.Kendo().Window()
    .Name("WSBrowseWindow")
    .Title("Browse Workspaces")
    .LoadContentFrom("BrowseWorkspaces", "Workspace")
    .Width(600)
    .Resizable()
    .Draggable()
    .Modal(true)
    .Visible(false))
Controller Action Is As Follows.  The query could return zero rows, so I add at least one element to the result.

public JsonResult WorkspaceFiles(string id, string workspace_id)
{
    if (id == null)
        id = workspace_id;
 
    ISession session = NHibernateHelper.GetCurrentSession();
    List<WorkspaceModels.WorkspaceFilesModel> files = (List<WorkspaceModels.WorkspaceFilesModel>)session.GetNamedQuery("Workspace_GetFiles")
        .SetParameter("pPARENT_ID", id)
        .SetResultTransformer(Transformers.AliasToBean(typeof(WorkspaceModels.WorkspaceFilesModel)))
        .List<WorkspaceModels.WorkspaceFilesModel>();
    NHibernateHelper.CloseSession();
 
    if (files.Count() == 0)
    {
        WorkspaceModels.WorkspaceFilesModel defaultNode = new WorkspaceModels.WorkspaceFilesModel();
        defaultNode.DOCXID = AppConstants.NULL_GUID;
        defaultNode.DOCXNAME = "No Data";
        defaultNode.HASCHILDREN = 0;
        defaultNode.DOCXPARENTID = null;
 
        files.Add(defaultNode);
    }
 
    var fileItems = from e in files
                    where (string.IsNullOrEmpty(id) == false ? e.DOCXPARENTID == id : e.DOCXPARENTID == null)
                    select new
                    {
                        id = e.DOCXID,
                        text = e.DOCXNAME,
                        hasChildren = Convert.ToBoolean(e.HASCHILDREN)
                    };
 
    return Json(fileItems, JsonRequestBehavior.AllowGet);
}
Fred
Top achievements
Rank 1
 answered on 17 Jun 2013
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
Drag and Drop
Application
Map
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?