Telerik Forums
Kendo UI for jQuery Forum
1 answer
176 views
Hi,

I'm using ASP.NET MVC wrapper to render treeview, and populating data with model binding.
I want to get treeview widget and datasource ( treeview = $("#treeview").data("kendoTreeView")  ) on page load, for example in $(document).ready. Result is undefined.
I have tried even in treeview databound event, result is same.
Cesar
Top achievements
Rank 1
 answered on 02 Apr 2014
3 answers
96 views
Hello, 

I have a selector on my chart, and also one in the navigator... I wish to have an event fired after the selector of the main chart is used, but not when the navigators selector is used. When I implement 

SelectEnd: onSelectEnd,

and 

onSelectEnd= function(e) {
**code**
}

this works for both selectors... Is there a way to limit this event only for the maincharts' selector, and leave the navigator alone? Thanks! =)
T. Tsonev
Telerik team
 answered on 02 Apr 2014
1 answer
327 views
Hi, I identified that when using a data source with serverFiltering enabled, while the user is typing something in the input the list of items are being filtered as well, when for example just 2 items remains in the list and the user press the tab button or just click outside making the component loses its focus nothing is selected in the combo. I would like that when the list of items still is open and I loses its focus the first item is auto selected.

I ended up doing something like this:

widget._events.change.push(function (event) {
               var minLength = $(element).attr("data-odata-minlength") || 2;
               var value = widget.value().trim();
               if (value != '' && value.length >= Number(minLength) && widget.dataItem() == undefined && widget._data().length > 0) {
                   var firstItem = widget._data()[0];
                   setTimeout(function () {
                       $.each(widget._data(), function (index, item) {
                           if (item.Id == firstItem.Id) {
                               widget.select(index);
                               return false;
                           }
                       });
                   }, 100);
                    }
           });
I don't like the idead of having a setTimeout function to set the select item but when I simply set the select without using the setTimeout function it works but something triggered after the change/close events resets my alteration and the selectIndex becomes -1.

Any tips?

Thanks.
Georgi Krustev
Telerik team
 answered on 02 Apr 2014
3 answers
394 views
Hello,

I have a problem with the HierarchicalDataSource in my treeview. I have a 3+ level datasource. The first and the second level are coming from local data, the third and every following level is coming by a webservice-method.

So far so good: First and second level get displayed perfectly, but with the third one I have some problems. Its loading data, but then it removes the icon (which says that Subfolders exist) and no subfolders are shown.

Fact 1: It jumps into the webservice-method, it returns data (all the subfolders), it gets into the success of the ajax-call

Fact 2: If I remove the second level and make the third+ level as my second one, everything works fine!!! (But I dont want to load the second level again, when I already have it in my folderStructure-object)

Here is my code:

var dataSource = new kendo.data.HierarchicalDataSource({
    data: folderStructure,
    schema: {
        model: {
            id: "Id",
            hasChildren: "HasChilds",
            children:
            {
                schema: {
                    data: "items",
                    model: {
                        id: "Id",
                        hasChildren: "HasChilds",
                        children: {
                            transport: {
                                read: function (options)
                                {
                                    var id = options.data.Id;
                                    $.ajax({
                                        type: "POST",
                                        url: webserviceUrl + "/GetSubFolders",
                                        data: JSON.stringify({ parentFolderId: id }),
                                        processData: false,
                                        contentType: "application/json; charset=utf-8",
                                        dataType: "json",
                                        xhrFields: {
                                            withCredentials: true
                                        },
                                        success: function (data)
                                        {
                                            options.success(JSON.parse(data.d));
                                        },
                                        error: function (data)
                                        {
                                            options.error(data);
                                        }
                                    });
                                }
                            },
                            schema: {
                                model: {
                                    id: "Id",
                                    hasChildren: "HasChilds"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
});


I hope someone can help me,

Thank you,
Best regards.
BigzampanoXXl
Top achievements
Rank 1
 answered on 02 Apr 2014
2 answers
308 views
Hello. I have 2 separate problems with Kendo Grid:

I've created test case to demonstrate them (it is SPA application): Open index.html

1. First can be reproduced by clicking Test 1 and Test 2 ( initially test 1 part is loaded).
a) after load Test 1 - Grid is shown without issue:
b) after press Test 2 - Second Grid is loaded without issue.
c)
after pressing Test 1 - First grid should be now shown but there is an
issue, and following error can be seen in e.g. Firebug console:
  Cannot call method 'value' of kendoDropDownList before it is initialized

This error is related to pageSizes flag. When it is false, there is no problem, but when it set to true or to size Array, error above occurring.

2.
Second problem is related to new column locking functionality. My
scenario requires to hide grid sometimes. Steps to reproduce:
a) press Read - after finishing loading grid will be hidden
b) press Read again - after finishing loading grid will be shown, but wrongly with columns wrongly displaying.

Kind Regards
Marcin

Petur Subev
Telerik team
 answered on 02 Apr 2014
1 answer
113 views
I am raising this in the forums because the support ticket page keeps giving me a 'server had an error' response page.

I was previously running Kendo version 2013.3.1324. I have been developing a column in the Kendo grid to have a sparkline in it's template.  This was displaying correctly in that version.  I have since upgrade to version 2014.1.318 to attempt to fix an issue we have with the Kendo grid where it freezes (I can explain the details in another support ticket to the Grid team).  Now we have upgraded the sparkline is no longer rendering properly. The top and bottom appear to be clipped.  I have attached a screenshot showing the problem.  I have compared the Html output by both version and something new has been added. It is the svg / defs / clippath / path  element.  It seems the new version puts a path element in the clippath node, removing this in the development tools on chrome fixes the display.
Why was it added and how can I fix the new version to display correctly.

I am also using angular-kendo.js. Although I believe this wouldn't affect the html rendered. My sparkline options are: 
{
            chartArea: {
                background: "",
                width: 110
            },
            tooltip: {
                visible: false,
            },
            categoryAxis: {
                crosshair: {
                    visible: false,
                },
            },
            
            seriesDefaults: {
                line: {
                    color: "#5889AD",
                    width: 1,
                },
                markers: {
                    visible: true,
                    size: 1,
                    border: {
                        color: "#d52b1e",
                        width: 2,
                    }
                }
            }
        };
Iliana Dyankova
Telerik team
 answered on 02 Apr 2014
2 answers
316 views
Hello,

I would like to customize my KendoUI Calendar (with month.content template). The rendering is correct the first time, but when I call the bind method (to bind data for other controls), the calendar rendering is again running but the data.dates property is empty (in month.content property).

Can you tell me how to solve this problem (to say to the Calendar to "not bind" data)?

Thanks.

Example (display this page and press F12... all is correct... press the button "Apply Biding") :

<input type="button" id="btnTest" value="Apply Binding" />
<div id="calendar" />

window.onload = () => {

    var myDates = [];
    myDates.push(new Date(2014, 0, 5));
    myDates.push(new Date(2014, 0, 6));
    myDates.push(new Date(2014, 0, 7));

    var calendarParams = {
        dates: myDates,
        month: {
            content: '<div>' +
            '#= myTrace(data) #' +
            '#= data.value #' +
            '</div>'
        },
    };

    $("#calendar").kendoCalendar(calendarParams);
        
    $("#btnTest").click(function() {
        kendo.bind("body", null);
    })

};

/* First time, display 3 items in the 'dates' property */
/* After binding, display 0 items in the 'dates' property */

function myTrace(data) {
    console.log(data);
    return "";
}

Denis
Denis
Top achievements
Rank 1
 answered on 02 Apr 2014
1 answer
95 views
In my Cordova 3.0 project (I want to use 3.0 instead of 3.2) the view in iOS7 appears below the status bar. I tried the margin-top:20px solution, but when I click a text box and the view goes up to focus on the input field and I click done, the view stays at 0px from the top most part. 

Any code that solves this issue for iOS7 and Cordova 3.0. I know that the StatusBar plugin fixes this, but no for Cordova 3.0.
Petyo
Telerik team
 answered on 02 Apr 2014
1 answer
449 views
Hi,

I wanted to know if it was possible to save the posted file in a database table as binary. I am using asp.net and an web service (asmx). My database table is

ID (int),
Filename varchar,
Filedata (varbinary).,
title (varchar),
Description (varchar)

A user uploads a document and gives it a title and description. I know I can use a separate web form page as the saveurl and get the posted file, but I am struggling with returning the ID to store the title and description. 

Any help greatly appreciated.
Daniel
Telerik team
 answered on 02 Apr 2014
1 answer
226 views
Hi friends,

I have a simple html+css+js app .

I use a structure of tabs linked with divs for the sections menu.

My problem is that i have in a section ( on a div ) only a reference of a img that is on a remote url , but this img maybe will change, but have always the same name. I want to know if there is some method to force always i click on the tab ( div ) of this section to reload the content of this div, or reload always this img, because in this moment only load when the app is launched the first time.

Thx you very much.

<div id="tabstrip-3" data-role="view" data-title="3">
        <div class="test" id="offers">
            <img src="http://www.remoteurl.com/test/image.jpg" height="100%" width="100%"/>
        </div>
    </div>

<div data-role="footer">
            <div data-role="tabstrip">
                <a href="#/" data-icon="home">1</a>
                <a href="#tabstrip-2" data-icon="organize">2</a>
                <a href="#tabstrip-3" data-icon="favorites">3</a>
                <a href="#tabstrip-4" data-icon="about">4</a>
            </div>
        </div>
Petyo
Telerik team
 answered on 02 Apr 2014
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
DropDownTree
ListBox
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?