Telerik Forums
Kendo UI for jQuery Forum
1 answer
106 views
I have a very simple listview bound to an items array in a very simple viewmodel.  The listview also has a click binding.  At first I thought that the click handler was not getting the dataitem but there is something else going on.  Before each item in the listview another row is being rendered.  Clicking this row gets us our dataitem.  Clicking the row with the item name in it does not.

Much easier if you see it so here is the jsfiddle: http://jsfiddle.net/HRuvg/

Clicking on the actual item doesn't work but if you click on the space above each item, it fires properly.   I must be missing something obvious because it doesn't get any simpler that this.
user1843640
Top achievements
Rank 1
 answered on 07 Dec 2012
1 answer
156 views
I am trying to change the DashType on each line in the series and it is not working... no matter what i change it to... it remains solid....

I was able to change the DashType on CategoryAxis and ValueAxis however... fyi... See sample code below:

@(Html.Kendo().Chart()
.Name("SalesDollarsChart")
.Title("Sales by Fiscal Week")
.HtmlAttributes(new { style = "height: 500px;  width: 1150px;" })
.Legend(legend => legend.Position(ChartLegendPosition.Bottom))
.ChartArea(chartArea => chartArea.Background("transparent"))
.Series(series =>
{
series.Line(new double[] { 15.7, 16.7, 20, 23.5, 26.6, 15.7, 16.7, 20, 23.5, 26.6 }).Name("TY Sales $").Color("Red").DashType(ChartDashType.LongDashDotDot);
series.Line(new double[] { 47.96, 48.93, 55, 54, 58, 47.96, 48.93, 55, 54, 58 }).Name("LY Sales $").Color("Blue").DashType(ChartDashType.Dot);
series.Line(new double[] { 75.7, 76.7, 80, 83.5, 86.6, 75.7, 76.7, 80, 83.5, 86.6 }).Name("TY On Hand $").Color("Green").DashType(ChartDashType.Dot);
series.Line(new double[] { 37.96, 38.93, 45, 44, 48, 37.96, 38.93, 45, 44, 48 }).Name("LY On Hand $").Color("Purple").DashType(ChartDashType.Dot);
})
.CategoryAxis(axis => axis
.Categories("5", "6", "7", "8", "9", "10", "11", "12", "13", "14")
.MajorGridLines(ml => ml.DashType(ChartDashType.Solid)))
.ValueAxis(axis => axis
.Numeric()
.Labels(labels => labels.Format("{0}%"))
.Min(0)
.Max(100)
.MajorUnit(10)
.MinorUnit(5)
.MajorGridLines(ml => ml.DashType(ChartDashType.Solid)))
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}%")
)


Scott
Top achievements
Rank 2
 answered on 07 Dec 2012
1 answer
265 views
Dear Kendo UI Team,

I have been studying the KendoUI Web examples and currently having problems getting data from a remote XML feed. Here's the example that I'm refering to Binding to XML Data and below is my code. I simply replace the source from local to Books.xml on the demo site.

Code:
<ul id="books"></ul>
 
            <script id="template" type="text/x-kendo-template">
                <li class="book">
                    <a href="#= url #">
                        <h3>#= title #</h3>
                    </a>
                    by #= author #
                </li>
            </script>
 
            <script>
                $(document).ready(function () {
                    function onChage() {
                        $("#books").html(kendo.render(template, this.view()));
                    }
 
                    // create a template using the above definition
                    var template = kendo.template($("#template").html());
 
                    var dataSource = new kendo.data.DataSource({
                        transport: {
                            // specify the XML file to read. The same as read: { url: "books.xml" }
                            read: "http://demos.kendoui.com/content/web/datasource/books.xml"
                        },
                        schema: {
                            // specify the the schema is XML
                            type: "xml",
                            // the XML element which represents a single data record
                            data: "/books/book",
                            // define the model - the object which will represent a single data record
                            model: {
                                // configure the fields of the object
                                fields: {
                                    // the "title" field is mapped to the text of the "title" XML element
                                    title: "title/text()",
                                    // the "author" field is mapped to the text of the "author" XML element
                                    author: "author/text()",
                                    // the "url" field is mapped to the text of the "url" XML element
                                    url: "url/text()",
                                    // the "cover" field is mapped to the "id" attribute of the "book" XML element
                                    cover: "@cover"
                                }
                            }
                        },
                        change: onChage
                    });
 
                    dataSource.read();
                });
            </script>

When I load the page, I don't get any data. Also, how can I see errors? Is there some code examples to display errors? Please advice. Thanks.

Gabe
Hari
Top achievements
Rank 1
 answered on 07 Dec 2012
2 answers
252 views

What is the proper way to edit items in a listview when using Kendo UI Mobile & MVVM?

I don't get the expected results when using the following:

HTML

<div id="itemsView"
    data-role="view"
    data-model="vm">

    <ul data-role="listview" data-bind="source: items" 
                             data-template="itemsTemplate">
    </ul>
    <script id="itemsTemplate" type="text/x-kendo-template">
    <li>
        #=Name#
    </li>
    </script>

    <input type="text" data-bind="value: newValue" />
    <button data-role="button" data-bind="click: update">update</button>
</div>​

JavaScript

var vm = kendo.observable({
    items: [{
        Name: "Item1"}],
    newValue: '',
    update: function(e) {
        var item = this.get("items")[0];
        item.set("Name", this.get("newValue"));
        //adding the follwoing line makes it work as expected
        kendo.bind($('#itemsView'), vm);
    }
});

kendoApp = new kendo.mobile.Application(document.body, {
transition: "slide"});​

I expect the listview to reflect the change to the Name property of that item. Instead, a new item is added to the listview. Examining the array reveals that there is no additional item, and that the change was made. (re)Binding the view to the view-model updates the list to reflect the change. Re-Binding after a change like this doesn't seem to make any sense.

Here is the jsfiddle: http://jsfiddle.net/5aCYp/2/

Note: This was originally posted on StackOverflow:
http://stackoverflow.com/questions/13739125

user1843640
Top achievements
Rank 1
 answered on 07 Dec 2012
2 answers
236 views

Hello,

I am wondering if the following behavior is intentional, and if there is a work-around.

The behavior I am describing can be seen on your TreeView demo at the following: 
http://demos.kendoui.com/web/treeview/images.html

When working with the tree on the right 'TreeView with sprites', notice how highlighting and expanding collapsing nodes works. Any node I click on gets highlighted orange as it is in a selected state, regardless of whatever node I expand/collapse the selected state stays on the originally selected node and no appearance changes occur with any other nodes. Play around with this for a little. This is all good.

Now...

1) Select the 'index.html' node (under the 'Kendo UI Project' folder node)
        2) Collapse the 'Kendo UI Project' parent folder node
        3) Collapse the 'My Documents' root node
        4) Notice how the 'My Documents' root node gets a grey highlight
        5) Expand the 'My Documents' root node (grey highlight remains)
        6) Expand the 'Kendo UI Project' folder node
        7) Notice how the grey highlight now is removed from the root node, and you can see the original 'index.html' node is still selected

Or another scenario:

1) Refresh the web page
        2) Without selecting any nodes, collapse all nodes on tree
        3) Expand the 'My Documents' root node
        4) Notice how the 'My Documents' root node gets a grey highlight



What is with the root node getting highlighted grey?

Is that intentional?

Either way, is there a workaround way to stop this from occurring?


Thanks for your help!
- Lee
Lee
Top achievements
Rank 1
 answered on 07 Dec 2012
3 answers
1.1K+ views
How do I change the template that is used on the popup that is displayed when the Add New Record option is clicked on the Kendo Grid? For example, I would like to change the "Edit" title of the popup window as well as not display certain data items as editable, such as the ID. I've looked all over on the forums and cannot find any way to do this.
Alexander Valchev
Telerik team
 answered on 07 Dec 2012
3 answers
201 views
I got dataSource config
new kendo.data.HierarchicalDataSource({
                   transport: {
                        read: {
                            url: '/getnodes'
                        }
                    },
                    schema: {
                        model: {
                            id: '_id'
                        }
                    }
                })

also I have a method wich provide adding nodes to treeview
addNode: function() {
     var tree = this.tree, //this.tree == $('#treeview').(/* config here */).data('kendoTreeView')
           sel = tree.select();

       /* some code here */

      $.ajax({
           url: '/addnode',
           data: {parent: parent},
           success: function(row) {
              el.append({
                        _id: row._id,
                        name: row.name
                    }, sel);
           }
      })
}

so what we have

node will added success, but afer - dataSource generate request to '/getnodes' and get it from database and render it to treeview
in result we have two same node in one brunch
please help to solve this problem
Georgi Krustev
Telerik team
 answered on 07 Dec 2012
1 answer
109 views
I've created a Kendo UI localization project in Github which localizes all texts in a single package for all controls in Kendo UI.

Unfortunately the Editor's OUTDENT text is not being localized.

You can find the issue in the Github tracker here: https://github.com/loudenvier/kendo-global/issues/2

You can download and run the test in the 3 languages and the only missing translation is the Outdent text.

Maybe it is a problem with the way I'm doing the translations on the project (the only way to accomplish that in a transparent manner was to change the prototype of the many widgets and "extend" the options with the translated texts - details can be found on the project). But since this is analogous to passing the options for each widget individually I believe the problem lies in the Kendo UI code which is not honoring the options.messages.outdent option.

UPDATE:

The attached zip file has a stand-alone html page which shows the bug by using only standard Kendo UI options for translating the 'indent' and 'outdent' messages. Now it is clear it is a bug in Kendo UI and not something wrong with the way the kendo-global project is translating the messages.
Dimo
Telerik team
 answered on 07 Dec 2012
1 answer
845 views
I want when user clciked a link, he can go back to the previous selected page and selected row of kendo grid. I can get his selected page number without problem by

$("#homesGrid").data("kendoGrid").dataSource.page();

In databound event of Kendo Grid, I cannot set his selected page. I can only set his selected row by
$("#homesGrid").data("kendoGrid").dataSource.page(2);   ====> error

var data = mygrid.dataSource.data();
$.each(data,
function (i, row) {
if (row.Fcode == fcode) {
  $(
'tr[data-uid="' + row.uid + '"]').addClass("k-state-selected");
}

Is the code of that line incorrect or is that I cannot set it in databound event of Kendo Grid?

 

Alexander Valchev
Telerik team
 answered on 07 Dec 2012
3 answers
133 views
Hi,

I have been using KendoUI in several mini pet-projects and it has been a great pleasure. The time has come for me to convince the rest of the team to use KendoUI in our flagship product.

I really like the KendoUI Mobile Layout and would like to know if there is similar functionality in KendoUI Web. What is your approach in organizing layout for larger web applications? Should we use KendoUI Mobile Layout even if our application is not intended for use on mobile devices? Can similar functionality be accomplished using KendoUI Templates?

Thanks,

Igor
Sebastian
Telerik team
 answered on 07 Dec 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
MultiColumnComboBox
Dialog
Chat
DateRangePicker
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
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
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?