Telerik Forums
Kendo UI for jQuery Forum
0 answers
225 views
Hello, i have a TreeView in my MVC application. When certain item is pressed, the div on page should change responding to the item ID.  There is my code for that page (view):

@model List<Omnitel.Models.Directory>

    @(Html.Kendo().TreeView()
            .Name("Treeview")
            .Events(events => events
                .Select("onSelect")
            )
            .BindTo(Model, mapping =>
            {
                mapping.For<Omnitel.Models.Directory>(binding => binding
                        .ItemDataBound((item, category) =>
                        {
                            item.Id = category.Id;
                            item.Text = category.Title;
                            item.BindTo(category.SubDirectories, mapping2 =>
                            {
                                mapping2.For<Omnitel.Models.Directory>(binding2 => binding2
                                        .ItemDataBound((item2, category2) =>
                                        {
                                            item2.Id = category2.Id;
                                            item2.Text = category2.Title;
                                            item2.BindTo(category2.SubDirectories, mapping3 =>
                                            {
                                                mapping3.For<Omnitel.Models.Directory>(binding3 => binding3
                                                        .ItemDataBound((item3, category3) =>
                                                        {
                                                            item3.Id = category3.Id;
                                                            item3.Text = category3.Title;
                                                        }
                                                ));
                                            });
                                        }
                                ));
                            });                      
                        }
                ));
            })
    )

    <script>
        var treeview;
        function onSelect(e) {
            var url = @Url.Action("GetDocument", "TreeView", new { e.sourceNode.ID );
        }
    </script>

As u can see, i want to put put an Id in each item. Is it possible? and how? Need fast response...

Tomas
Top achievements
Rank 1
 asked on 03 Oct 2012
1 answer
515 views
I have a grid and it allows inline editing.

The add, delete and save operations on the grid, intermittently gives this error: 

  1. Uncaught TypeError: Cannot read property 'BrandID' of undefined
    1. (anonymous function)
    2. (anonymous function)kendo.web.js:9
    3. o.extend._acceptkendo.web.js:9
    4. (anonymous function)kendo.web.js:9
    5. (anonymous function)jquery-1.8.2.js:1127
    6. g.(anonymous function).call.c.successkendo.web.js:9
    7. callback

The 'BrandID' is the Model ID

Please help
Dimo
Telerik team
 answered on 03 Oct 2012
0 answers
116 views
hi...,

 Is there any possiblity to get the the edited values in to an array for listview in an edit mode.

Thankyou,
Ruqsana.
Ruqsana
Top achievements
Rank 1
 asked on 03 Oct 2012
3 answers
738 views
Hi,
I need to extend the DataSource with a new method.
If I create a new datasource like this:
var myDatasource = new kendo.data.DataSource(.....);

I want to do like this:
myDatasource.myCustomMethod();

How can I extend Datasource with the new method myCustomMethod?

I tried something like this:
$.extend(true, kendo.data.DataSource, {
myCustomMethod: function() {
alert('hello from custom method');
}
});

But it does not work. Please help.
Apu
Top achievements
Rank 1
 answered on 03 Oct 2012
6 answers
325 views
hi all;
i want use kendoui css style on other dom Components,Look the same,i how to  set the <input type=text> class ?please help me ,thanks. 

Kamen Bundev
Telerik team
 answered on 03 Oct 2012
3 answers
275 views
Hi, I'm wondering why I can't get the reference of my kendo menu. The code is wrapped inside a document ready of jquery.

var menu = $("#menu").data("kendoMenu");
 
        menu.bind("select"function (e) {
            var menuItemHeader = $('#menu li').first();
            var menuItemHeaderValue = $(menuItemHeader).find('.k-link').text();
 
            alert(menuItemHeaderValue);
        });

Firebug is saying that my "menu" is undefined but when I inspect the $('#menu'), I'm seeing some kendo events and properties.
Did I miss something?
Dimo
Telerik team
 answered on 03 Oct 2012
1 answer
8.4K+ views
How do I get the selected index of a DropDownList?  I don't see anything in the API docs.
Hari
Top achievements
Rank 1
 answered on 03 Oct 2012
1 answer
188 views
Hi Everyone.

I'm trying to use the Kendo TreeView and I'm having absolutely no luck binding to a local data source. I have a simple asp.net web forms page and I copied and pasted the code from the online demos, but nothing I do will get this working. Any ideas?

<head runat="server">
    <title>Kendo TreeView Demo</title>
    <link href="styles/kendo/kendo.common.min.css" rel="stylesheet" />
    <link href="styles/kendo/kendo.default.min.css" rel="stylesheet" />
    <style type="text/css">
        * { font-family: "Segoe UI", Arial, Helvetica, Sans-Serif; font-size: 12px; }
    </style>
    <script type="text/javascript" src="scripts/jquery.min.js"></script>
    <script type="text/javascript" src="scripts/kendo/kendo.all.min.js"></script>
    <script type="text/javascript" src="scripts/kendo/kendo.data.min.js"></script
    <script type="text/javascript">
        $(document).ready(function ()
        {
            var inlineDefault = new kendo.data.HierarchicalDataSource(
            {
                data:
                [
                    {
                        text: "Furniture",
                        items:
                        [
                            { text: "Tables & Chairs" },
                            { text: "Sofas" },
                            { text: "Occasional Furniture" }
                        ]
                    },
                    {
                        text: "Decor",
                        items:
                        [
                            { text: "Bed Linen" },
                            { text: "Curtains & Blinds" },
                            { text: "Carpets" }
                        ]
                    }
                ]
            });
 
            $("#treeview-left").kendoTreeView(
            {
                dataSource: inlineDefault
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="treeview-left"></div>
    </div>
    </form>
</body>
</html>
Alex Gyoshev
Telerik team
 answered on 03 Oct 2012
0 answers
112 views
How to set the Pager position on top in Kendo Grid.
Thanks
Muthu
Top achievements
Rank 1
 asked on 03 Oct 2012
0 answers
229 views
Hi All,

I found out strange behavior when placing Kendo treeview which contain icons inside PanelBar.
The icon alignment is not same horizon with the node's text.
However when I place the treeview outside the PanelBar, it behave correctly.
This behavior is not an issue in previous version of Telerik Extensions for ASP.NET MVC.
Anand Chua
Top achievements
Rank 1
 asked on 03 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
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?