Telerik Forums
Kendo UI for jQuery Forum
1 answer
116 views
In Kendo.all.js line 5123, call to get the data from the datasource is performed, but there is no check to see if the data returned is undefined.

I put in a temporary fix, but it may not be the proper way, but at least it stops Kendo from crashing.  I am posting it here to let someone know:
that.data = function(data) {
    var record,
        getter,
        idx,
        length,
        modelInstance = new that.model();
 
    data = dataFunction(data);
 
    if( isEmptyObject(data) )   // Added this fix to prevent errors if no data was returned
        return {};
         
    if (!isEmptyObject(getters) ) {
        for (idx = 0, length = data.length; idx < length; idx++) {
            record = data[idx];
            for (getter in getters) {
                record[getter] = modelInstance._parse(getter, getters[getter](record));
            }
        }
    }
 
    return data;
}

Alexander Valchev
Telerik team
 answered on 09 May 2012
0 answers
61 views
Is there any combination of calls I can use to make a dropdownlist's text+value blank again after the first time it has been selected? The reason being that I am using a data source to change the options available to the list, and I want the user to know that they have to select a new option when the list's contents change. Currently, it keeps the text of the last selection, even if its option is no longer present in the list.

Does anyone have any possible solutions to this problem?
Joshua
Top achievements
Rank 1
 asked on 09 May 2012
6 answers
678 views
Hi,

I have a listview that it's something like this:
<ul id="items" data-bind="source: items"></ul>

and that has selection, is bounded to a observable datasource, so i can add new items etc.
When I select an existent item I would like to bind the item details in adiv outside of the listview.

I'me doing the following in the listview change event:
var data = activitiesSource.view(),
selected = $.map(this.select(), function (item) {
      return data[$(item).index()];
});
viewModel.set("selectedItem", selected);

 The 'selectedItem' is a member of my obersable viewModel. My item details div is something like:
(i've also tried to add a data-source prop to the outside div with 'value: selectedItem' but also doesn't work)
<div class="js-item-details">
<h2 data-bind="text: selectedItem.Title"></h2>
<h3 data-bind="text: selectedItem.Descritpion"></h3>
</div>

In debug I see that the selected Item is correctly setted but when the div shows all fields ara with undefined an no errors.

Am I in the wrong path?
Lee
Top achievements
Rank 1
 answered on 09 May 2012
1 answer
266 views
Is it possible to do this? I have this jsfiddle....http://jsfiddle.net/6yJkM/32/ 

I'm adding an extra column in and I've tried to modify the row template and refresh the grid but I don't see the template being applied. Can anyone see a way of making that work please?

Thanks
Matt
Iliana Dyankova
Telerik team
 answered on 09 May 2012
5 answers
382 views
I have a ListView  that render this template:

<script type="text/x-kendo-tmpl" id="template_token_list">
            <div id="token" class="k-header">
                <h3>${codice}</h3>
                <div id='token_status' class='${colore}'></div>
                <img src="/upload/token/${codice}_small.jpg"><br>
                <button class="k-button info"><span class="k-icon k-warning"></span></button>
                <input style="display:none;" class="comboAction" />
            </div> 
</script>


<script>
...
$("#listView").kendoListView({
        dataSource: dataSource,
        template: kendo.template($("#template_token_list").html())
    });

 $(".comboAction").kendoComboBox({
            dataTextField: "text",
            dataValueField: "value",
            dataSource: items,
            placeholder: "Action..."
        });
...

but, when I call the listView refresh

var listView = $("#listView").data("kendoListView");
listView.refresh();

all the kendoComboBox return to normal input 

Please help me

Rosen
Telerik team
 answered on 09 May 2012
0 answers
111 views
If set the config param
selectable: "row"

for a grid it throws the error
c.ui.Selectable is not a constructor 

(I have included the kendo.web.min.js) Am i supposed to do anything else to make the grid rows selectable?
Vijay
Top achievements
Rank 1
 asked on 09 May 2012
6 answers
367 views
In RAD ASP controls there was a demo for full-browser window layout using Rad Splitter and panels etc. The nice thing about that demo was while resizing the browser, it allowed to automatically resize all panels within it.

We need similar type of feature in Kendo UI - how do we achieve that? For example,  I need such feature using TabStrip so that the Tab Panel resizes according to the browser size and other items like menu and call remain fix size.
Alex Gyoshev
Telerik team
 answered on 09 May 2012
1 answer
182 views
In a TreeView I can add the following:

.bind("drag", function(e) {

        })

Which allows me to access the dropTarget, which is a DomElement. How can I go about both determining if this is a tree node, and getting said tree node?
Alex Gyoshev
Telerik team
 answered on 09 May 2012
0 answers
158 views
$("#productsGrid").kendoGrid({
    dataSource: dataSoucrce,
    columns: columns,
    scrollable: true,
    groupable: true,
    sortable: true,
    pageable: true,
    filterable: true,
    selectable: "multiple,row",
 
    //put query box in toolbar
    toolbar: "<input class='span3' type='text' id='productsQuery'/>",
 
    //init query box's autocomplete
    dataBound: function(){
 if(typeof $("#productsQuery").data("kendoAutoComplete") == "undefined") {
    $("#productsQuery").kendoAutoComplete({
        minLength: 1,
        dataTextField: "key",
        filter: 'contains',
        change: function(){
            if($("#productsQuery").val() == "") {
                $("#productsGrid").data("kendoGrid").dataSource.filter({});
            }
        },
        placeholder: "Search product key...",
 
        //use the datasource of productsGrid
        dataSource: $("#productsGrid").data("kendoGrid").dataSource
    });
}
    }
});

As you see, I put the query box in the toolbar of kendoGrid, and use kendoGrid's datasource for the kendoAutoComplete.
But I found that after I grouped by the kendoGrid, the autoComplete dropdown list became list of "undefined"s.
Chris
Top achievements
Rank 1
 asked on 09 May 2012
0 answers
120 views
Hello,

I have created a couple of real simple Android applications using the webview. This time however I am creating an actual interface and of course my button are defined in xml. I could define them in Java but for now they are in xml. Can I use / apply Kendo themes to Android XML objects? For example:...of course there is no such Style parameter so I made that last line up to show what I was thinking.

TIA
JB

<Button
            android:id="@+id/btn_Next"
            android:layout_width="100dp"
            android:layout_height="40dp"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:layout_marginRight="30dp"
            android:layout_marginBottom="30dp"
            android:text="Next"
            android:onClick="btn_NextClick"
            android:Style="BlueOpal"  />
Ramjet
Top achievements
Rank 1
 asked on 09 May 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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?