Telerik Forums
Kendo UI for jQuery Forum
3 answers
302 views
Hi All,

I've only just started using Kendo UI stuff so please bear with me.

I have included the grid in an ASP.NET MVC 4 application in a cshtml file with the following code lifted from an example:

<h2>Administration</h2>
@Html.Kendo().Grid(Model.SystemUsersViewModels).Name("SystemUserGrid").Columns(columns =>
    {
        columns.Bound(user => user.UserName);
        columns.Bound(user => user.Email);
        columns.Bound(user => user.IsApproved);
        columns.Bound(user => user.IsLockedOut);
        columns.Bound(user => user.LastLoginDate);

    }
).Pageable().Sortable().Scrollable().Filterable().DataSource(datasource => datasource.Ajax().ServerOperation(false))

I have a simple grid being fed a collection of UserViewModels via the property SystemUsersViewModels on my view model.

I have been trying to keep the JS size down so I had originally included just the grid js, then used the custom online tool to build a kendo.custom.js, all failed to I ended up including the kitchen sink files (as far as I'm aware) and I still cannot get this to work without errors.

kendo.all.min.js
kendo.aspnetmvc.min.js

The grid renders ok with the data but I get the following error ...

Error:
0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'kendoGrid'

I've run out of ideas now, any pointers would be great.

TIA,
Bin
Top achievements
Rank 1
 answered on 24 Apr 2013
0 answers
121 views
Hi,

I need to binding local data to treeview with data 3 level in razor. Can kendo UI work  ? 

Sample
   
     public class Level1
    {
        public string RootName {get;set;}
        public List<Level2> rootLevel2 {get;set;}
    }

    public class Level2
    {
        public string RootName { get; set; }
        public List<Level3> rootLevel3 {get;set;}
    }

    public class Level3{
          public string RootName { get; set; }
    }

CSHTML Page view

    @(Html.Kendo().TreeView()
            .Name("rootView")
            .BindTo((IEnumerable<Level1>)Model.Level1, (NavigationBindingFactory<TreeViewItem> mappings) =>
            {
                mappings.For<Level1>(binding => binding.ItemDataBound((item, root) =>
                {
                    item.Text = root.RootName;
                    item.Expanded = true;           
                })
                .Children(category => category.rootLevel2)
                );

                mappings.For<Level2>(binding => binding.ItemDataBound((item, root2) =>
                {
                    item.Text = root2.RootName;
                })
                .Children(category => category.rootLevel3)
                );

                mappings.For<Level3>(binding => binding.ItemDataBound((item, root3) =>
                {
                    item.Text = root3.ItemName;
                }));
            }))


There sample code above does not work for me, Always show error  "Sequence contains no elements"

Thank you in advance.
Wudhinun
Top achievements
Rank 1
 asked on 24 Apr 2013
1 answer
355 views
Hello.

I am binding to the Change event of the datetime picker but need to show a confirmation when it is changed.  How can I get the previous value when the change event fires?
Iliana Dyankova
Telerik team
 answered on 24 Apr 2013
3 answers
330 views
Now that the Breadcrumbs control is available for Silverlight RadControls, are there any plans to add a similar control to Kendo Web? If so, when could we expect to see it? Is there an item already tracking this so we could vote on it?

Thanks!
Maria
Top achievements
Rank 1
 answered on 24 Apr 2013
1 answer
72 views
It seems using a pre-filtered data source on a grid no longer flags the filter as active in the Q1 2013 release, however the filter is applied. It seems if you click on the filter the UI pops up and has the proper fields filled out, and will correctly flag the filter as active when the pop-up loses focus.

I made a demo here: http://jsfiddle.net/sparksterz/49N3g/

Any insight or confirmation of the problem would be helpful.
Iliana Dyankova
Telerik team
 answered on 24 Apr 2013
1 answer
45 views
Hi All,

I currently have a mobile listview that has endless scrolling (server paging).  By endlessScroll design, when another page is requested from scrolling, the previous page data is not available in the dataSource.   Therefore when I want to remove the item from the listview, I would typically use "dataSource.remove(model)"  The code snippet below shows where I have the dataSource.remove(model).   But if I try and remove an item from a previous page, it is not in the dataSource.   Would anyone know how I would remove the item from the listview not in the current dataSource list?   Would I need to remove it from the DOM level?   Any help would be greatly appreciated!  

Thanks in advance. 
function touchstart_inbox(e) {
            var target = $(e.touch.initialTouch),
                listview = $("#group-inbox").data("kendoMobileListView"),
                model,
                button = $(e.touch.target).find("[data-role=button]:visible");
 
            if (target.closest("[data-role=button]")[0]) {
                var ID = $(e.touch.currentTarget).find(".msgID").attr("data-id");
                if (target.closest("[data-role=button]")[0].id == "InboxDeleteButton") {
 
                    $.ajax({
                        type: 'PUT',
                        url: '/api/Message/' + ID + "/?decision=1",
                        success: function () {                          
 
                            dataSource.remove(model);
 
                        },
                        failure: function (errMsg) {
                            alert("Something happened.  Triage not recorded");
                        },
                        dataType: "json"
                    });
 
 
                }
}
}

Alexander Valchev
Telerik team
 answered on 24 Apr 2013
1 answer
82 views
I've got a grid.  Each new row will has a default FK value that ties each row to the parent on the page item (master, child or master - detail where the page is the master, the grid is each child record).

How do I set the FK value so that when I add a new row using the grid, it knows what FK to bind each row too?

Alexander Valchev
Telerik team
 answered on 24 Apr 2013
2 answers
166 views
I'm currently evaluating the Kendo UI Grid for use with our product and have come across an issue regarding column widths. According to many forum posts the defined column widths of a Grid become fixed if the Grid's "scrollable" property is set to true. I need to use the grid with scrollable.virtual = true, with the ability to set the width of the Grid's columns, and potentially have a horizontal scrollbar. According to existing forum posts this doesn't seem to be possible.

However, when I look at the Kendo UI site's example, specifically this one: 
http://demos.kendoui.com/web/grid/virtualization-remote-data.html

We have a grid that is scrollable, in virtual mode, and the widths of the columns seem to be respected with a horizontal scrollbar. In my testing, my code is virtually identical with the exception of using my own datasource, yet I end up with columns with equal widths. Is the behavior in the example actually possible or is that based on some deprecated version? 

Also is there a way to get the vertical scrollbar to show up on mobile devices/tablets?

Thanks, 
Kenny
Alexander Valchev
Telerik team
 answered on 24 Apr 2013
1 answer
163 views
I'm wondering if I can use more than just html elements in the text area that is created by the dataTextField. I'd like to add html classes but I'm having trouble getting it to work. 

Example:

dataTextField: "text",
 dataImageUrlField: "imageUrl",
 dataContentField: "content",
dataSource: [
     {
      text: "Bid Details",
      imageUrl: "img/bid_details_icon.png",
      content: "<table class="hello_world"><tr><td>Hello World</td></tr></table>"
      },

The set of quotes for the class name breaks the string. 

Thanks
-Brandon
Dimiter Madjarov
Telerik team
 answered on 24 Apr 2013
3 answers
765 views
Hi!
I'm trying to create a simple form using two autocompletes (column1 and column2). I want the form to be fluent, so after the first autocomplete is selected I tried to set the focus on the next one. (using the select event in the first autocomplete)

I tried: 

$("#column2").focus(); and $("#column2").data("kendoAutoComplete")focus(); 
but it didnt't work.

I set up a sample in js fiddler

How can I achieve the desired behavior?

Thanks!
Georgi Krustev
Telerik team
 answered on 24 Apr 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
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
AICodingAssistant
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
+? 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?