Telerik Forums
Kendo UI for jQuery Forum
0 answers
115 views
data     [ { ProductTypeId="1558", name="Apparel"}, Object { ProductTypeId="1554", name="Bottlecap Clips"}, Object { ProductTypeId="1550", name="Bows"}, etc...]

This is how my json is coming back.  How should I format the datasource?  I can't figure out to write the schema.  Do I need a schema?

 $("#grid").kendoGrid({
                        dataSource: {
                            type: "odata",
                            transport: {
                                read: "data.cfm"
                            },
                            schema: {
                                data: {
                                        producyTypeId: { type: "number" },
                                        siteId: { type: "number" }
                                }
                            },
                            pageSize: 10,
                            serverPaging: true,
                            serverFiltering: true,
                            serverSorting: true
                        },
                        height: 250,
                        filterable: true,
                        sortable: true,
                        pageable: true,
                        columns: [{
                                title:"ID",
                                field:"producyTypeId",
                                filterable: false
                            },
                            "name"
                        ]
                    });
Dennis
Top achievements
Rank 1
 asked on 05 Dec 2011
4 answers
179 views
If you open multiple windows. It is clear that the z-index goes from step 1. If I want to rearrange the window as fronted, I use toFront (). A window focus event get there?

If my English is very poorly understood, may help to code:).

el.kendoWindow({
                click: function(){
                  alert('go'); // Please do something like this ...
                },
                width: "500px",
                height: "300px",
                dragend: function(){
                  this.toFront(); // So bad, right?
                },
                actions: ["Refresh", "Minimize", "Maximize", "Close"],
                title: "Modal Window",
       }).data("kendoWindow").center().open();
Arni
Top achievements
Rank 1
 answered on 05 Dec 2011
2 answers
329 views
In my data source, one of the columns is a string data type and contains the "&" in the text. When the grid renders, it's translating those "&"s to &

How can I prevent this from happening? I'm binding to a local data source and I have a schema defined:

dataSource: {
    data:
    [
        @foreach (var report in Model.Reports)
        {
            <text>{Id: "@report.Id", ReportId: "@report.ReportId", ReportSample: "@report.ReportSample", ReportLegend: "@report.ReportLegend", ReportFaq: "@report.ReportFaq", ReportName: "@report.ReportName"}, </text>
        }
    ],
    schema: {
        model: {
            fields: {
                Id: { type: "number" },
                ReportId: { type: "string" },
                ReportSample: { type: "string" },
                ReportLegend: { type: "string" },
                ReportFaq: { type: "string" },
                ReportName: { type: "string" }
            }
        }
    }
}

Is there possibly a way in the column definition to tell it to render those "&"s as actual "&"s?

Thanks
Philip
Top achievements
Rank 1
 answered on 05 Dec 2011
1 answer
135 views
When in the calendar on January 2012. If you click on the back button it goes to November 2011 and not december!
Georgi Krustev
Telerik team
 answered on 05 Dec 2011
2 answers
101 views
Hello,
When I select value from dropdown div, it will not close in IE9 but closes in FF and Chrome. Anything I have missed?

This is what I have on page, just pasted it from your samples page:

<script src="Scripts/jquery.min.js" type="text/javascript"></script>
    <script src="Scripts/kendo.core.js" type="text/javascript"></script>
    <script src="Scripts/kendo.list.js" type="text/javascript"></script>
    <script src="Scripts/kendo.popup.js" type="text/javascript"></script>
    <script src="Scripts/kendo.data.js" type="text/javascript"></script>
    <script src="Scripts/kendo.data.odata.js" type="text/javascript"></script>
    <script src="Scripts/kendo.dropdownlist.js" type="text/javascript"></script>
    <script src="Scripts/kendo.fx.js" type="text/javascript"></script>
    <link href="Styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <link href="Styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
        $(document).ready(function() {
            var data = [
                { text: "Black", value: "1" },
                { text: "Orange", value: "2" },
                { text: "Grey", value: "3" }
            ];
 
            // create DropDownList from input HTML element
            $("#color").kendoDropDownList({
                    dataSource: data,
                    index: 0,
                    change: onChange
                });
            });
        
        function onChange() {
            
        }
    </script>
<input id="color" value="0"/>
Georgi Krustev
Telerik team
 answered on 05 Dec 2011
9 answers
234 views
Is there a Asp.Mvc 4 template we can download?
Atanas Korchev
Telerik team
 answered on 05 Dec 2011
1 answer
127 views
Works under Chrome but not under IE9.

OS:Win7
Chrome: v15.0.874.121 m
IE9: v9.0.8112.16421 -- IE update: v9.0.3


Alex Gyoshev
Telerik team
 answered on 05 Dec 2011
4 answers
105 views
Hi, 

I got a problem when I tried to put more than 1 chart type in a page. I want to see 2 types, bar and line in the same page, so I experimented with chart example (index.html). The behavior is that when I put another chart type drawing underneath the first chart drawing function, the page rendered only the last chart I just put. 
       Actually I'm quite new in JQuery so I'm not sure did I put anything wrong.  The code here was modified from the example named "index.html" in kendoui\examples\dataviz\line-chart. 

<div class="description">Basic usage</div>
        <div id="example" class="k-content">
            <div class="chart-wrapper">
                <div id="chart" style="background: center no-repeat url('../../shared/styles/world-map.png');"></div>
            </div>
            <script>
           $(document).ready(function() {
                    createChart1();
               createChart2();
                  
                });

                function createChart1() {
                    $("#chart").kendoChart({
                        theme: $(document).data("kendoSkin") || "default",
                        title: {
                            text: "Internet Users"
                        },
                        legend: {
                            position: "bottom"
                        },
                        chartArea: {
                            background: ""
                        },
                        seriesDefaults: {
                            type: "line"
                        },
                        series: [{
                            name: "World",
                            data: [15.7, 16.7, 20, 23.5, 26.6]
                        }, {
                            name: "United States",
                            data: [67.96, 68.93, 75, 74, 78]
                        }],
                        valueAxis: {
                            labels: {
                                format: "{0}%"
                            }
                        },
                        categoryAxis: {
                            categories: [2005, 2006, 2007, 2008, 2009]
                        },
                        tooltip: {
                            visible: true,
                            format: "{0}%"
                        }
                    });
                }              
            </script>
        </div>


 <div id="example" class="k-content">
            <div class="chart-wrapper">
                <div id="chart" style="background: center no-repeat url('../../shared/styles/world-map.png');"></div>
            </div>
            <script>
                function createChart2() {
                    $("#chart").kendoChart({
                        theme: $(document).data("kendoSkin") || "default",
                        title: {
                            text: "Internet Users"
                        },
                        legend: {
                            position: "bottom"
                        },
                        chartArea: {
                            background: ""
                        },
                        seriesDefaults: {
                            type: "column"
                        },
                        series: [{
                            name: "World",
                            data: [15.7, 16.7, 20, 23.5, 26.6]
                        }, {
                            name: "United States",
                            data: [67.96, 68.93, 75, 74, 78]
                        }],
                        valueAxis: {
                            labels: {
                                format: "{0}%"
                            }
                        },
                        categoryAxis: {
                            categories: [2005, 2006, 2007, 2008, 2009]
                        },
                        tooltip: {
                            visible: true,
                            format: "{0}%"
                        }
                    });
                }              
            </script>
        </div>


Note that both createChart1 and createChart2 are all the same except the chart type defined.

What I've done wrong for this??  

By the way, I must say you team has done an impressive work. I'll let my team based in Thailand learn to use your widget for new HTML5 compliance web development. 

Thank you!
vee
Top achievements
Rank 1
 answered on 05 Dec 2011
1 answer
384 views
Hello everybody :)

I am using KendoGrid to perform some CRUD operations on my database. I have a field set as "number", so Kendo is diplaying buttons for increasing and decreasing its value (as the example showed here)

I want to change the step size, by the following code:

$("#seasons_grid").kendoGrid({
        dataSource: dataSource,
        navigatable: true,
        pageable: true,
        height: 400,
        toolbar: ["create", "save", "cancel"],
        columns: [
        {
            field: "name",
            title: title_nombre
             
        },
        {
            field: "percentage",
            format: "{0:p}",
            step: "0.1",
            title: title_porcentaje
        },
        {
            field: "start_date",
            title: title_fecha_inicial,
            template: '#= kendo.toString(start_date, "'+formatDate+'")#'
        },
        {
            field: "end_date",
            title: title_fecha_final,
            template: '#= kendo.toString(end_date, "'+formatDate+'")#'
        },
        {
            command: "destroy",
            title: " ",
            width: "110px"
        }],
        editable: true
    });

Nevertheless, it is not working as the upper arrow increases the value in one unit, and it must be increased in 0.1 (as a percentage).

Thanks in advance :)
Rosen
Telerik team
 answered on 05 Dec 2011
2 answers
360 views
Hello,
When dropdownlist is just created, you may set initial value to it. I want to handle "change" event from different control. Is there a way to fire change event when dropdownlist initial value is set?
Thanks.
Dmitry
Top achievements
Rank 1
 answered on 05 Dec 2011
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?