Telerik Forums
Kendo UI for jQuery Forum
3 answers
211 views
I see that it is very easy, and there are several examples, of how to get remote data via AJAX for Charts assuming you don't need to pass any parameters to get the remote data.  How do I pass additional params to the Controller/Action?

FYI, I am using the MVC Extensions.

Thanks in advance,
Petur Subev
Telerik team
 answered on 09 Aug 2013
1 answer
385 views
I was very suprised to see so few methods in the documentation for the Kendo Upload, specially becouse I know it's been in the toolset a longer time. I basicly did my own UI for the upload. Most of the current buttons are hidden, I keep only the dropzone. The first problem I had is I couldnt just link methods to programaticly start an upload or open file choser dialog. I managed to get that functionality bi using their respective buttons click handlers.

One method I'm strugling with is clearing the files list programaticly. So I have implemented an item edit window with a picture upload. On select I managed to extract a file preview for the image before its sent to the server. If you click the save button for the window the form gets saved and the new photo uplodaed. If you click cancel however and open the same edit window for a different item. The old picture stayed in the upload. I want to clear it. Is there a way to do that? I have the file list hidden.
Petur Subev
Telerik team
 answered on 09 Aug 2013
3 answers
1.7K+ views
Hi,

I am trying to show remote data in grid, my dataSource config is like this:

var items= new kendo.data.DataSource({                            
    transport: {
        read: {
            url: "http://localhost:59515/HTML/Service.svc/Temp",
            dataType: "jsonp",
            data: {                                        
            }
        }
    },
    error: function(e) {
        console.log(e);
    },
    schema:
    {
        data:"d",
        model:
        {
            fields:
            {
                Text: {
                    editable:true, validation: {  required:true  }
                },
                Qty: {
                    editable: true,  type:"number",  validation: {   required:true,   min:1   }
                },
                Val: {
                    editable:false
                }
            }
        }
    }
    }
);

Response JSON:
{
"d":
[
    {"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
    {"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
    {"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
    {"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
    {"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
    {"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
    {"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"},
    {"__type":"MyClass:#","Qty":"4","Text":"195\/65R15 Sportiva","Val":"45.54"}
]
}

No data is displayed in the grid, though the error event handler of dataSource is called and the console.log shows following error:
  1. line: 2
  2. message: "Unexpected token ':'"
  3. sourceId: 2055063872
  4. sourceURL: "http://localhost:59515/HTML/kendo/js/jquery.min.js"
  5. status: "parsererror"
Inbxx
Top achievements
Rank 1
 answered on 09 Aug 2013
2 answers
106 views
Hi,

I have noticed that the images I have used in my mobile application being downloaded in my mobile album sometimes. How to prevent the downloading of images?

Thanks,
Amrutha.
Amrutha
Top achievements
Rank 1
 answered on 09 Aug 2013
3 answers
1.7K+ views
Hi, i'm currently experimenting with kendoUI, and it looks pretty good and easy to use.
I have a question regarding binding data to a multiple series chart. My objective would be binding local data from a datasource, and then move on to binding remote JSON data to the chart.
Starting from the scatter line multiple series example at http://demos.kendoui.com/dataviz/scatter-charts/scatter-line.html, i tried putting the provided data into a data source:
var ds = new kendo.data.DataSource ({
        data: [
            {"name": "0.8C", "values": [[10, 10], [15, 20], [20, 25], [32, 40], [43, 50], [55, 60], [60, 70], [70, 80], [90, 100]]},
            {"name": "1.6C", "values": [[10, 40], [17, 50], [18, 70], [35, 90], [47, 95], [60, 100]]},
            {"name": "3.1C", "values": [[10, 70], [13, 90], [25, 100]]}
        ],
    });
However, i can't understand how to bind this data to the chart. Of course, i will need to specify the chart's datasource as the defined variable, but in single-series charts i must specify the columns from the data source. How can i configure the chart to display correctly the legend (name field) and each value?
Ricardo
Top achievements
Rank 1
 answered on 09 Aug 2013
3 answers
176 views
Hi,

I've been playing around with the SPA parts.

Let me explain how our app works. We are using ASP MVC / Web API on the server. We are also using Microsofts unobtrusive ajax library to load between different pages in our SPA. So when clicking a link to an entierly different page (for instance moving from Calendar to Cotacts) an ajax request is sent to the server to fetch the contents of the main content area. The request returns just the main area's HTML and that gets renderded without having to reload the surrounding menus and all the script / css files on each page change. The server is smart enough to know if its a ajax request. If its not the html for the request it returns gives out the whole layout with the menus, HTML head and everything.  so a direct link to any page renders normaly, and moving within the application just uses ajax to update main content area.

So when unobtrusive ajax on a click pulls data for a new content area and renders it we also need to change the history state. We are just using vanilla History api with no legacy fallback. We were wondering if we could replace that with the router? Does it support legacy fallback is the first question? The second one is can I use the router to absolutely change an url. So no "#". The way I see it, if I haven't missed anything the router is usefull for tracking states on the current page, but not for linking multiple different pages that make up our more complex SPA.
Petyo
Telerik team
 answered on 09 Aug 2013
1 answer
203 views
Hi,
Currently I am trying to use the new inline editor because I want to use div contenteditable tag instead of html tag.

Can I know if it is a way to fix the toolbar on the top on inline editor instead of pop-up toolbar?

Thanks
Dan
Iliana Dyankova
Telerik team
 answered on 09 Aug 2013
1 answer
70 views
I don't know exactly what is going on, but when I click the "Next day" > arrow on the Agenda view, the control requests new data from the server but never moves the day.  When I move backwards, it moves back 2 days at a time; not a week at a time.

I tried to debug through the code and it appears that the internal _startDate is wrong by 1 day and then when the "next day" calls get Next Day, it returns today, since the start day is internally yesterday.

I think this might be a timezone issue, but I am not sure...  I am configuring the control just like the demo (which seems to work), but my code won't:

view._scheduler.kendoScheduler({
            date: new Date("2013/6/13"),
            startTime: new Date("2013/6/13 07:00 AM"),
            height: 700,
            views: tmpViews,
            editable: false,
            timezone: "Etc/UTC",
            dataSource: {


With the code above, the internal _startDate is set to:
Wed Jun 12 2013 00:00:00 GMT-0700 (PST)

And then the internal call to NextDay is incremented to "Today", which means the Agenda will just stay where it is.

Debugging through Kendo.All

  • On Init of Agenda View, date and startDate are what I passed in
  • But somewhere later when I click on the > button it gets changed...

Thoughts?

Rosen
Telerik team
 answered on 09 Aug 2013
4 answers
241 views
Hi;

I have a [Kendo] ListView in a [razor] view. I have a drop down as part of the ListView template. I can get the drop down loaded with an enumeration list and can bind to the onchange event. What is not happening is the combo box is not being initialized with the specified value in the bound data object [to each row of the list view].My ListView template is as such.<script type="text/x-kendo-template" id="GroupUserMappingTemplate">

<div>
@Html.DropDownList(
"AccessLevel",
new SelectList(Enum.GetValues(typeof(P3X_DataAccess.Models.AccessLevel))),
new {
onchange = "(AccessLevelChanged(this));"
}
)
</div>
</script>
The property the combo box is initialized to is called AccessLevel. It is the name of the property that is in the object that is bound to the List View rows, and I assume is valid for use as the bound property. The binding does not occur (but no errors occur either).

Peter
Peter
Top achievements
Rank 1
 answered on 08 Aug 2013
2 answers
313 views
I have a grid that I have hooked up to a PHP webservice. The dataSource.transport.read option is set to the following:

function(operation)
{
    if($('#grid').data('bindData') !== false)
    {
        var params = operation.data;
        params['id'] = $('#grid').data('webServiceId');
        $.ajax({
            url: 'webservice.php',
            contentType: 'application/json',
            type: 'POST',
            data: kendo.stringify(params),
            success: function(response) { operation.success(response); }
        });
    }
}


The bindData is just a boolean condition I'm setting so that it won't make requests to the webservice at certain points.

This works for normal functionality. The issue here is that I'm dynamically setting the pageSize option based on how much available vertical space is in the content area of the grid. So when I initialize it, I don't want to make a webservice request right away, so I set the option to false, calculate the space, set the pageSize, then want to make the call to run the transport function, but not sure how to do this properly. I can call it manually using $('#grid').data('kendoGrid').dataSource.transport.read(); but that doesn't send the parameters to it so the 'operation' parameter is undefined and the webservice doesn't get any of the paging, sorting or filtering options. And calling dataSource.read() or refresh() doesn't seem to work either.

How can I accomplish this? Is there a way to pass the transport function the necessary parameters or is there a better way to handle it?

Let me know if there's anything else you need.
Stacy
Top achievements
Rank 2
 answered on 08 Aug 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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)
SPA
Filter
Drawer (Mobile)
Drawing API
Globalization
Gauges
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
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?