Telerik Forums
Kendo UI for jQuery Forum
1 answer
123 views
Hi after I extracted my code from a asp.mvc site to an explicit js file
the grid doesn't load the data.

The grid is executed and the script runs, but it seems like the grid never triggers the read function

Am I doing something wrong?
here my js code

integration of the js file
<script src="~/Scripts/Domain/Inbox.js"></script>


Js File itself:
/// <reference path="../Kendo/kendo.all-vsdoc.js" />
function onSelectionChanged(e) {
    var selected = this.select();
    
    selected.data("Subject");
    $('#memo').append(selected.field);

}

$(document).ready(function () {
    var apiUrl = '@(Url.RouteUrl("DefaultApi", new { httproute = "", controller = "nbox" }))';

    $("#inboxGrid").kendoGrid({
        dataSource:
            {
                transport: { read: apiUrl },
                pageSize: 10
            },
        columns: [
            { title: "Sendedatum", field: "SentDate", filterable: true, sortable: true, format: "{0:dd.MM.yy}" },
            { title: "Subject", field: "Subject", filterable: true, sortable: false }
        ],
  
    });


});

Boas
Top achievements
Rank 1
 answered on 13 Sep 2012
1 answer
139 views
Hello,

I am trying to port cascading dropdown from WebUi samples i.e. Make/Model to mobile and having hard time to do simple binding (local or remote) to <select /> element with form.
What am I doing wrong? Good example would be appreciated.
Iliana Dyankova
Telerik team
 answered on 13 Sep 2012
0 answers
157 views
Hi All,

I have some Buttons on the left side and a scrollable listView on the right. Every Button belongs to an element in the listView.
For example button3 belongs to element number 12:
var element = $("#scrollbar_kendo").data().kendoListView.element.children()[12];

My question is: How can i scroll down the listView to display the element number 12?

Is that possible?

Thanks
Sebastian
Sebastian
Top achievements
Rank 1
 asked on 13 Sep 2012
3 answers
1.0K+ views
Hey there,

I was wondering if you can explain to me why I get the following error:

"d.name is undefined"

JS:
$(function () {
    $("#id_purchase_place").kendoAutoComplete({
        minLength:3,
        dataTextField:'name',
        dataSource:{
            serverPaging:true,
            pageSize:20,
            contentType:'application/json; charset=utf-8',
            type:'GET',
            dataType:'json',
            transport:{
                read:'/purchases/ajaxpurchase_place/'
            }
        }
    })
});

JSON RESPONSE
[{"name": "Woolies"}, {"name": "Bunnings"}]
Andrew
Top achievements
Rank 1
 answered on 13 Sep 2012
0 answers
140 views
I have many KendoFile controls that are dynamically created using a loop.  They all work, and upload files.  But for each one I need to know their unique ID (which I pass back to the handler).  However when the upload event fires I can't seem to traverse to find parents.

So the way I get the ID now is to register a click event, and put the val into a global variable.  This works for normal uploads.  But it all fails for drag and drop.

First I write one upload control per round
<asp:Repeater ID="Repeater1" runat="server">
    <ItemTemplate>
        <div class="roundSectionHeader">
          
            <span class="uploadwrapper" data-roundid="<%# Eval("ID") %>">
                <input type="file" ID="LayoutUpload<%# Eval("ID") %>" class="kendoFileLayout" />
            </span>
        </div>
    </ItemTemplate>
</asp:Repeater>
                


Then I wire it up.
$(".kendoFileLayout").kendoUpload({
    async: {
        saveUrl: "../Handlers/UploadPDF.ashx",
        removeUrl: "../Handlers/RemovePDF.ashx",
        autoUpload: true
    },
    success: onSuccessLayout,
    upload: function onUploadLayout(e) {
        e.data = { jobid: pageValues.jobId, jobroundid: layoutRoundId, fullname: globalValues.fullName };
    }
 
});


But to get layoutRoundId I wire a click event

$(".uploadwrapper").click(function () {
    layoutRoundId = $(this).data("roundid");
});


This works, but I cannot get a good event for the drop event.  Also once I am inside the kendoUpload event I seem to lose context and cannot reference parents or siblings
Jeremy
Top achievements
Rank 1
 asked on 12 Sep 2012
0 answers
130 views
I have a bubble chart shown below. It works ok, except the sizeField is not sizing appropriately. If I remove the grouping, the sizeField will work correctly, but I will not see the data grouped how I would like it. (Comment out the "group:" section to see difference).

Is this a bug or a problem in my code? 

<script>
    var Productivity = [
                        {
                        perHour: 1100,
                        score: 5.25,
                        units: 49610,
                        area: "Territory 31",
                        year: 2012
                        },
                        {
                        perHour: 800,
                        score: 8.53,
                        units: 304197,
                        area: "Territory 32",
                        year: 2012
                        },
                        {
                        perHour: 965,
                        score: 8.62,
                        units: 13403,
                        area: "Territory 33",
                        year: 2012
                        },
                        {
                        perHour: 785,
                        score: 7.97,
                        units: 125007,
                        area: "Territory 34",
                        year: 2012
                        },
                        {
                        perHour: 690,
                        score: 8.04,
                        units: 137459,
                        area: "Territory 36",
                        year: 2012
                        },
                        {
                        perHour: 1050,
                        score: 7.9,
                        units: 214197,
                        area: "Territory 42",
                        year: 2012
                        },
                        {
                        perHour: 705,
                        score: 5.2,
                        units: 95403,
                        area: "Territory 43",
                        year: 2012
                        },
                        {
                        perHour: 1190,
                        score: 9.8,
                        units: 425007,
                        area: "Territory 44",
                        year: 2012
                        },
                        {
                        perHour: 250,
                        score: 4.5,
                        units: 189592,
                        area: "Territory 46",
                        year: 2012
                        }
                        ];
 
    function createChart() {
        $("#chart").kendoChart({
                                dataSource: {
                                    data: Productivity
                                    ,group: {
                                        field: "area"
                                    }
                                },
                                series: [{
                                    name: "Accuracy vs. Productivity",
                                    type: "bubble",
                                    xField: "perHour",
                                    yField: "score",
                                    sizeField: "units"
                                }]
                                ,tooltip: {
                visible: true,
                format: "{2:N0} units",
                opacity: 1
            }
                            });
    }
 
    $(document).ready(function() {
        setTimeout(function() {
            // Initialize the chart with a delay to make sure
            // the initial animation is visible
            createChart();
 
            $("#example").bind("kendo:skinChange", function(e) {
                createChart();
            });
        }, 400);
    });
</script>
Thomas
Top achievements
Rank 1
 asked on 12 Sep 2012
0 answers
166 views
Hi,

I'm having trouble using the Fluent API to create my treeview.  Both Template and CheckboxTemplate do not seem to affect my nodes that have been created through BindTo.  Special characters in the templates are also resulting in their escaped source code representations such as "\u0027".  Can you guys please provide some advice and perhaps an example of a databound TreeView created through the Fluent API that uses checkboxes?  Thanks.

Reposted in the MVC forum.  Sorry.  Please delete this one.
David
Top achievements
Rank 1
 asked on 12 Sep 2012
2 answers
447 views
hi,
I want to load the menu dynamically  using Hierarchical data Source.can u provide some sample code to load menu dynamically using hierarchical data Source. 
Tina
Top achievements
Rank 1
 answered on 12 Sep 2012
2 answers
329 views
Hi, how do I disable a switch in Kendo Mobile?

I am using the following html:
<input data-role="switch" id="KeepMeSignedIn" name="KeepMeSignedIn" type="checkbox" disabled="true"></input>

Thanks in advance
Iliana Dyankova
Telerik team
 answered on 12 Sep 2012
6 answers
368 views
Hi,

Is there a way to capture the 'pullToRefresh' event so I can clear out my 'pageSize / page' variables?

The issue is this:

If you have endless scroll enabled and scroll down to load the next page, when you scroll back up and drag down to activate the pull to refresh function, the ajax request is sent with the parameters used for the pagination.

var datasource = new kendo.data.DataSource( {
    serverPaging: true,
    pageSize: 30,
    page: 1,
    transport: {
            read: {
                url: url,
                datatype: 'jsonp'
            },
            parameterMap: function (options) {
            console.dir( options );
            var parameters = {
                st: ( options.page - 1 ) * options.pageSize
            }
  
            return parameters;
        }
    },
    schema: {
        data: function (data) {
            return data;
        },
        total: function (data) {
            return data.count; // total number of items
        }
    }
} );

I need to send an offset (st) rather than a page number to the database but regardless, when I pull to refresh, I'd like to reset those values.

Thanks!
Iliana Dyankova
Telerik team
 answered on 12 Sep 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
TextArea
BulletChart
Licensing
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
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?