Telerik Forums
Kendo UI for jQuery Forum
0 answers
173 views
Hi all,
I'm writing a dashboard using kendo charts and knockout, but I'm having several problems trying to use dynamic series.
Here you can find a sample what I'm trying to do: http://jsfiddle.net/PeppeDotNet/9SHrk/
Why I can't see anything in the category axis?

Thank you for your help.
Peppe
Giuseppe Marchi MVP
Top achievements
Rank 1
 asked on 14 Oct 2012
1 answer
113 views
Hi Team,

Till shortwhile ago, there was no issues in loading the script.

Now i could see the js error "Unresponsive Script" (screenshot attached). Any idea on why this happens ?

thanks,
Prasad.
prasad
Top achievements
Rank 1
 answered on 14 Oct 2012
0 answers
107 views
I need to
1.  copy/add an item from 1 dataset to another
2.  dynamically pull individual items from dataset with the add item based id

The code below does this and works in safari and firefox.  It does not work in IE.  IE shows the item but not the value.  If I put a default value in the schema, ie shows the default value.  The problem appears to be the way the .add is handled in ie.  Additionally, when I try to debug dsDrugsDosage in IE, it says binary object and won't let me interrogate it.  Any guidance on how to debug this is appreciated.

function getData()
        {
            item = dsDrugs.get('1');
            dsDrugsDosage.add(item);
 
        }

I have a simple button that
Sample Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.mobile.min.js"></script>
    <script src="../../content/shared/js/console.js"></script>
    <link href="../../../styles/kendo.common.min.css" rel="stylesheet" />
    <link href="../../../styles/kendo.mobile.all.min.css" rel="stylesheet" />
    <script>
       
        var drugs =
        [
        {
        "id": 1,
            "name": "Epinephrine",
            "price": 12.00,
            "intratracheal": 1,
            "category": "CPR",
            "categoryid": 1,
            "intravenous":2,
            "featured": true
        },
        {
        "id": 2,
            "name": "Atropine",
            "price": 21.00,
            "intratracheal": 2,
            "category": "CPR",
            "categoryid": 1,
            "intravenous":4,
            "featured": false
        },
  
 
        {
        "id": 3,
            "name": "Naloxone",
            "price": 4.00,
            "intratracheal": 5,
            "category": "Pain",
            "categoryid": 2,
            "intravenous": 2,
            "featured": false
        },
        {
        "id": 4,
            "name": "Lidocaine",
            "price": 12.50,
            "intratracheal": 33,
            "category": "Pain",
            "categoryid": 2,
            "intravenous": 3,
            "featured": false
        },
        {
        "id": 5,
            "name": "Valium",
            "price": 10.00,
            "intratracheal": 4,
            "category": "Anesthesia",
            "categoryid": 3,
            "intravenous": 77,
            "featured": false
        },
        {
        "id": 6,
            "name": "Magnesium chloride",
            "price": 4.00,
            "intratracheal": 12,
            "category": "ICU",
            "categoryid": 2,
            "intravenous": 3,
            "featured": false
        },
 
        {
        "id": 7,
            "name": "Calcium chloride",
            "price": 9.50,
            "intratracheal": 13,
            "category": "ICU",
            "categoryid": 3,
            "intravenous": 13,
            "featured": false
        },
        {
        "id": 8,
            "name": "Glucose",
            "price": 6.00,
            "intratracheal": 13,
            "category": "ICU",
            "categoryid": 3,
            "intravenous": 3,
            "featured": false
        },
        {
        "id": 9,
            "name": "Shock volume of fluids",
            "price": 17.00,
            "intratracheal": 13,
            "category": "Fluids",
            "categoryid": 4,
            "intravenous": 4,
            "featured": false
        },
        {
        "id": 10,
            "name": "Maintenance volume of fluids",
            "price": 7.75,
            "intratracheal":13,
            "category": "Fluids",
            "categoryid": 4,
            "intravenous": 44,
            "featured": false
        }
        ]
        ;
        var schema = { model: {
            id: "id",
            fields: {
                id: {
                    //this field will not be editable (default value is true)
                    editable: false,
                    // a defaultValue will not be assigned (default value is false)
                    nullable: true
                },
                name: {
                  defaultValue: "Error with Name",
                },
                intratracheal: {
                },
                intravenous: {
                },
                category: {
                }
            }
        }
        };
 
        var dsDrugs = kendo.data.DataSource.create({
            schema: schema,
            data: drugs,
            group: "category",
            error: function () { alert(arguments); }
        });
 
       var dsDrugsDosage = kendo.data.DataSource.create({
            data: [],
            schema: schema,
            group: "category",
            error: function () { alert(arguments); }
        });
 
        dsDrugs.fetch();
 
        function getData()
        {
            item = dsDrugs.get('1');
            dsDrugsDosage.add(item);
 
        }
 
        function dosageResultsViewInit() {
            $("#dosageresults-listview").kendoMobileListView({
                dataSource: dsDrugsDosage,
                template: $("#dosageResultsListViewTemplate").html(),
                headerTemplate: "<h2> ${value}</h2>"
            });
        }
 
    </script>
    <script type="text/x-kendo-template" id="dosageResultsListViewTemplate">
    <span class="item-title">${name}</span>
    <input class="item-info" type="text" value="#:intravenous#"/>
    <input class="details-link" type="text"  value =""#:intratracheal#" />
    </script>
  
</head>
<body>
    <div data-role="view" id="drugresultsview" data-layout="mobile-view" data-title="Dosage Results"
        data-init="dosageResultsViewInit">
        <div data-role="header">
            <div data-role="navbar">
                <span>Dosage Results</span> <a data-role="button" data-align="left" href="#drugcalcview">
                    Back</a>
            </div>
        </div>
        <div class="head">
            <a href="javascript:getData()">GetData</a></div>
        <div id="drugresultsviewbg" class="k-content">
            <ul id="dosageresults-listview">
            </ul>
        </div>
    </div>
    <script>
        window.kendoMobileApplication = new kendo.mobile.Application(document.body);
    </script>
</body>
</html>
John
Top achievements
Rank 1
 asked on 14 Oct 2012
0 answers
76 views
Hello
when my data source fill from controller by default select one value fordeopdownlist and i set null for value of deopdownlist i dot want select any value.

$(document).ready(function () {
 
        var baseAddress = window.parent.document.location + "Home/";
        var viewModel = kendo.observable({
            userDataSource: new kendo.data.DataSource({
                transport: {
                    read: {
                        url: baseAddress + "GetUsers",
                        dataType: "json",
                    }
                }
            }),
            SelectedRole: null,
            SelectedUser: null,
            accessValue: null,
            Roles: [],
            Accesses: [],
 
        });

Mohammad
Top achievements
Rank 1
 asked on 14 Oct 2012
1 answer
1.0K+ views

Hi

I am new to Kendo ui and have created a MVC page with a very simple Grid

@Html.Kendo().Grid(Model).Name("kendoGrid").Columns(columns =>

    {

        columns.Bound(p=>p.Id).Width(50);

        columns.Bound(p => p.name);

        columns.Bound(p => p.Date);

        columns.Bound(p => p.time);

        columns.Command(command => { command.Custom("Details").Text("Details").Action("Edit", "Booking"); }).Width(100);

           

    }).Sortable().Scrollable().DataSource(dataSource => dataSource.Server()

        .Model(model => model.Id(p => p.Id))                        

    ).HtmlAttributes(new{Style ="height: 100%"})

My question is what is the best way to refresh the grid data every 1min. whiteout reloading the whole page.
David
Top achievements
Rank 1
 answered on 14 Oct 2012
0 answers
82 views
Hi,

I'd like to use the treeview, and simultaneously drag and drop elements outside it to the nodes in it.

What I'd like to do is:
1. When manipulating the nodes in the treeview, it acts as the defaults of tree view
2. When dragging the element outside the treeview and drop it in the treeview, it fires my dropTargetOnDrop function.

I have tried the followings:

1. Set the draggable element 

$("#draggable").kendoDraggable({group: "list", ....});


2. Set the dropTarget elements

$(".k-in").kendoDropTarget({group: "list", dragEnter: dropTargetOnDragEnter, ...});

The result is the manipulation the nodes in the treeview fires my dropTargetOnDragEnter function.

Could you please give me some advices?

Thanks in advance.

Michio SHIRAISHI



Michio
Top achievements
Rank 1
 asked on 13 Oct 2012
0 answers
73 views
Hi ,

I am building a multi-axis chart with data generated from webservice. As a part of the data source, I am grouping data based on a field Category. Here is a sample of the data
Category: Temp, Value: 20
Category:Temp, Value:22
Category:Humidity,Value:45
Category:Humidity:Value:48

I would like to create in the chart two axis one for Temp and other for Humidity. Since the series are created automatically, I would like to know how do I assign Temp Axis to Category 'Temp' and other axis to Category 'Humidity' based on the series name or series array.

Thanks,
Vinayak
Vinayak
Top achievements
Rank 1
 asked on 13 Oct 2012
1 answer
235 views
Hi, what am I missing? I'm trying to initialize a datasource with a simple array as data, just like in the documentation http://docs.kendoui.com/api/framework/datasource#methods
. But I cannot get it working.

    var orders = [ { orderId: 10248, customerName: "Paul Smith" }, { orderId: 10249, customerName: "Jane Jones" }];
var dataSource = new kendo.data.DataSource({
     data: orders
});
     
   var order = dataSource.at(0);
     
   if (typeof(order)=="undefined") {
       alert("fail");
   } else {
       alert(order.customerName);
   };


http://jsfiddle.net/HB8NZ/

thanks
Jonas
Top achievements
Rank 1
 answered on 13 Oct 2012
0 answers
135 views
Hi Team,

I have a created a tree using JsonObject dynamically.

$("#treeview").kendoTreeView({
                template:kendo.template($("#treeview-template").html()),

                checkboxTemplate:kendo.template($("#treeview-checkbox-template").html()),
                hasChildren:true,
                dataSource: <?=$jsonDataForTree?>,
                EnableCaching:false
            });

now that i have a tree , I would like to have a copy paste functionality for this same.
1. I have disabled the move option as this not required as per our requirements.
2. I have created two buttons "Copy" and "Paste"
                   Usage : select a node and go to other node and simply click Paste button. This would copy the entire source(including the nested nodes) to destination.

How can this be achieved ? your help is highly appreciated.

Thanks in advance,
Prasad.
prasad
Top achievements
Rank 1
 asked on 13 Oct 2012
1 answer
390 views
Hi, I'm implementing the library Kendo UI Web (not MVC server wrapper) in an ASP.NET MVC4 web application (razor), with encouraging results regarding the use of kendogrid and kendowindow. But the problems start when I try to use multiple nested modal windows.

The scenario is as follows:
- a "_Layout.vbhtml" template with references to (in order) jquery-1.7.1.js, jquery.validate.js, jquery.validate.unobtrusive.js and kendo.web.min.js.
- an "Index.vbhtml" view with a kendogrid that correctly loads JSON data from a call to a controller action.
In this view I put also a modal kendowindow that dynamically loads in its content the CRUD forms when the user clicks on a grid row.

Regarding the Create and Update operations, the forms (loaded into this first modal window) consist respectively of two views, "Create.vbhtml" and "Edit.vbhtml", that share the same partial view "_CreateOrEdit.vbhtml" from which I have to open another modal kendowindow for lookup operations during the filling of the form.

All data and operations of all components (loading data, form validation, opening and closing kendowindows, the availability of the KendoUI environment) work alternately, depending on the manner in which I insert or less of additional references to scripts "jquery-1.7.1", "jquery.validate", "jquery.validate.unobtrusive" and "kendo.web.min" on top of the views or partial views, in addition to those references present in "_Layout.vbhtml".

At the moment I can: load the main grid, click on a row and open the first modal dialog with the edit form, regularly open the second modal lookup kendowindow with a grid inside correctly running, but when I try to close the second kendowindow I get the js error "L(b) is undefined" or an error like "$("#kLookup").data("kendoWindow") is undefined" (but "$("#kLookup")" is defined!)!!!

I want to know if the library KendoUI Web is compatible with such a scenario (a bit complicated to explain, but actually quite simple). Are there guidelines or best practice about how I have to reference to the JavaScript scripts to get a correct use of the library without conflict with JQuery, JQueryValidate and the usage of nested modal kendowindow?

Thanks in advance!
Andrea
Andrea
Top achievements
Rank 1
 answered on 13 Oct 2012
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
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?