Telerik Forums
Kendo UI for jQuery Forum
3 answers
176 views
Hello!
I'd like like to be able to specify during runtime  what columns grid would have.  Is this functionality available in 2013 Q1?

More scenario details:
  user checks in multiselect countries he is interested in (USA, Germany, Australia) and grid is created with 3 columns for corresponding country :
                          USA     Germany   Australia
          Metric1     2              32             12
          Metric2    15             10             11
 Then user also selects Japan and it's added as column #4 to the grid


Alexander Valchev
Telerik team
 answered on 13 May 2013
2 answers
153 views
Hello Support:

I'm trying to reference DataSource through RequireJS under Durandal, and I'm having issues.  As you may know (since Kendo UI is promoted as being compatible with Durandal on the Durandal website), Durandal uses AMD and accesses modules relative to a baseURL specified on a data-main attribute.

I know now that Kendo UI supports RequireJS, so that simply referencing "kendo.grid.min", for example, in a list of RequireJS dependencies injects the kendo.grid.

Two questions:
  1. How do I reference DataSource?  I assumed the pattern would be kendo.datasource.min, but it isn't;
  2. Is there a way to get to DataSource on the CDN?  I would prefer to shim to the CDN than adjust the baseURL to point to the root.
With respect to #2 above, the default baseURL for Durandal is ~/App/.  I don't want to go to ~/.

Ultimately, my goal is simply to inject a DataSource using RequireJS under Durandal.

Thank you.

Eric
Missing User
 answered on 13 May 2013
1 answer
246 views
I basically want to know if I can extend the Editor to include a Print functionality via a button in the toolbar.

Edit: I will be using HTML helper of the Kendo Editor

Thx,
Aaron
Dimo
Telerik team
 answered on 13 May 2013
1 answer
239 views

Anyone else have this happen?

Adding kendo.all.* in my BundleConfig.cs throws a javascript error every time (only for IE browser):

Microsoft JScript runtime error: Unable to get value of the property 'msie': object is null or undefined

I'm using IE9.  The debugger highlights this code inside the kendo.all.min.js file:

D=e.browser.msie&&8>parseFloat(e.browser.version)?function(e){return e.offsetTop}:function(t){return t.offsetTop-e(t).height()}

I'm using jQuery 1.9.1 and my bundleconfig class has the below code (I've put all css first, but the js files order is correct per Kendo documentation)

01.public class BundleConfig
02.{
03.    public static void RegisterBundles(BundleCollection bundles)
04.    {
05.        bundles.Add(new StyleBundle("~/Content/css").Include(
06.                    "~/Content/site.css"));
07. 
08.        bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
09.                    "~/Content/themes/base/jquery.ui.all.css"));
10. 
11.        // Kendo CSS bundle
12.        bundles.Add(new StyleBundle("~/Content/kendo").Include(
13.                    "~/Content/kendo.common.*",
14.                    "~/Content/kendo.default.*"));
15. 
16. 
17.        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
18.                    "~/Scripts/jquery-{version}.js"));
19. 
20.        bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
21.                    "~/Scripts/jquery-ui-{version}.js"));
22. 
23.        bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
24.                    "~/Scripts/jquery.unobtrusive*",
25.                    "~/Scripts/jquery.validate*"));
26. 
27.        bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
28.                    "~/Scripts/modernizr-*"));
29. 
30.        // Kendo Script bundle
31.        bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
32.                    "~/Scripts/kendo.all.*",
33.                    "~/Scripts/kendo.aspnetmvc.*"));
34. 
35.        // Clear all items from the ignore list to allow minified CSS and JavaScript files in debug mode
36.        bundles.IgnoreList.Clear();
37. 
38. 
39.        // Add back the default ignore list rules sans the ones which affect minified files and debug mode
40.        bundles.IgnoreList.Ignore("*.intellisense.js");
41.        bundles.IgnoreList.Ignore("*-vsdoc.js");
42.        bundles.IgnoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
43. 
44.    }
45.}
Vladimir Iliev
Telerik team
 answered on 13 May 2013
1 answer
94 views
This is in reference to the documentation at http://docs.kendoui.com/getting-started/framework/spa/router.

It indicates that "/items" is valid for the route "/items/*suffix" but it does not match because there is no trailing slash. If I use a route of "/items*suffix" instead it works.

Perhaps you can correct the documentation, so that it isn't misleading.

Thanks,
Gary
Petyo
Telerik team
 answered on 13 May 2013
1 answer
87 views
My app sets up several routes and then starts the router. I have a scenario now in which I'm loading additional code on demand, which requires its own routes. I need the new routes to be inserted at the beginning of the route collection because they handle more specific cases than what was added initially.

I got it working using the following code:
_router.route(route, callback);
_router.routes.unshift(_router.routes.pop());
Is this the recommended approach?

Thanks,
Gary
Petyo
Telerik team
 answered on 13 May 2013
5 answers
133 views
I'm not sure where to post bug information. Please let me know if it should go somewhere other than here.

In 2013 Q1's builds (and at least the current latest internal build as well as the previous) kendo core references the wrong jQuery instance. Using the latest internal build as reference (build 506):

  • Line 2790 uses jQuery.each instead of $.each
  • Line 2794 uses jQuery.event.special instead of $.event.special
  • Line 2806 uses !jQuery.contains instead of !$.contains
I'm sure these go unnoticed to most users but I wrap my kendo scripts to be loaded with RequireJS and it's important that the correct reference provided by the closure is used.
Petyo
Telerik team
 answered on 13 May 2013
1 answer
138 views
My code below does not populate the fields in the grid. I get an empty grid with headers only.
Fiddler shows that the read is executed and returning results. Any ideas?
$("#pageresultGrid").kendoGrid({
            dataSource: {
                type: "odata",
                schema: {
                    model: {
                        fields: {
                            DRG: { type: "string" },
                            DRGDescription: { type: "string" },
                        }
                    },

                    errors: function (response) {
                        return response.errors;
                    },
                    data: function (response) {
                        return response["value"];
                    }
                },
                transport: {
                    read: {
                        url: ksWebApiSearchUrl,
                        dataType: "jsonp"
                    }
                }
            },

            pageable: {
                numeric: true,

                refresh: true,

                pageSize: 5,

                previousNext: true,

                input: false,

                info: false,
                messages: {
                    display: "Viewing {0} - {1} of {2}",
                    empty: "No items to display",
                    page: "Page",
                    of: "of {0}",
                    itemsPerPage: "items per page",
                    first: "Go to the first page",
                    previous: "Go to the previous page",
                    next: "Go to the next page",
                    last: "Go to the last page",
                    refresh: "Refresh"
                }
            },
            sortable: true,
            columns: [
            {
                headerTemplate: '<input type="checkbox" id="checkAll">',
                template: '<input type="checkbox" value="1" id="results-select-row1"><label class="visuallyhidden" for="results-select-row1">Select Row</label>',
                width: 40
            },
            {
                field: "DRG",
                headerAttributes: {
                    "class": "ks-gridheader"
                },
                template: '<a href="javascript:GetTabDetail(#=DRG#)">#=DRG#</a>',
                width: 60,
                title: "DRG"
            },
            {
                field: "DRGDescription",
                headerAttributes: {
                    "class": "ks-gridheader"
                },
                width: 130,
                title: "DRG Description"
            }
            ]
        });
Nikolay Rusev
Telerik team
 answered on 13 May 2013
0 answers
107 views
It seems that the kendo ui only suppert to pass the parameter like string,int ,but not List<student> this custom class.

ActionResult GetStudentImfo([DataSourceRequest] DataSourceRequest request, string name, int id)
this format is OK,but
ActionResult GetStudentImfo([DataSourceRequest] DataSourceRequest request,List<student>) is not OK.
xi
Top achievements
Rank 1
 asked on 12 May 2013
1 answer
575 views
For some reason the delete dialog is firing twice.  It doesn't call the destroy function until after you go through both dialogs.

Any ideas?

001.<div id="grid"></div>
002. 
003.<script>
004.    $(document).ready(function() {
005.        var crudServiceBaseUrl = "main.php?a=quotereport", dataSource = new kendo.data.DataSource({
006.            transport : {
007.                read : {
008.                    url : crudServiceBaseUrl + "&read=1",
009.                    dataType : "json"
010.                },
011.                destroy : {
012.                    url : crudServiceBaseUrl + "&destroy=1",
013.                    dataType : "json"
014.                },
015.                parameterMap : function(options, operation) {
016.                    if (operation !== "read" && options.models) {
017.                        return {
018.                            models : kendo.stringify(options.models)
019.                        };
020.                    }
021.                }
022.            },
023.            batch : true,
024.            schema : {
025.                data: "data",
026.                total: "total",
027.                model : {
028.                    id : "id",
029.                    fields : {
030.                        id: {
031.                            validation : {
032.                                required : true
033.                            }},
034.                        first_name: {
035.                            validation : {
036.                                required : true
037.                            }},
038.                        last_name: {
039.                            validation : {
040.                                required : true
041.                            }},
042.                        dob: {
043.                            validation : {
044.                                required : true
045.                            }},
046.                        email: {
047.                            validation : {
048.                                required : true
049.                            }},
050.                        phone: {
051.                            validation : {
052.                                required : true
053.                            }},
054.                        age: {
055.                            validation : {
056.                                required : true
057.                            }},
058.                        date: {
059.                            validation : {
060.                                required : true
061.                            }}
062.                    }
063.                }
064.                }
065.        });
066. 
067.        $("#grid").kendoGrid({
068.            dataSource : dataSource,
069.            pageable : false,
070.            height : 430,
071.            editable: 'inline',
072.            columns : [{
073.                field : "id",
074.                title : "ID"
075.            }, {
076.               field  : "date",
077.               title  : "Date"
078.            }, {
079.                field : "first_name",
080.                title : "First Name"
081.            }, {
082.                field : "last_name",
083.                title : "Age"
084.            }, {
085.                field : "dob",
086.                title : "Birthday"
087.            }, {
088.                field : "email",
089.                title : "Email"
090.            }, {
091.                field : "phone",
092.                title : "Telephone"
093.            }, {
094.                field : "age",
095.                title : "Age"
096.            },           
097.            {
098.                command : ["destroy"],
099.                title : " ",
100.                width : "160px"
101.            }]
102.        });
103. 
104.    });
105.</script>
Jayesh Goyani
Top achievements
Rank 2
 answered on 12 May 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?