Telerik Forums
Kendo UI for jQuery Forum
1 answer
156 views
 i have a form with a button that upon clicked should fill a grid with data via ajax to a php script. the php script is ok but no data is shown on the grid..here 's my code below...any help please!!!

//function for button clicked
      $(function(){
          $("#fetchmani").click(function(){
            var routes    = document.getElementById('routes').value;
                  $.ajax({
                        type: 'POST',
                        url: 'data/fetchmani.php',
                        data: "routes="+ routes,
                        success: function(response){
                           var grid = $("#grid").data("kendoGrid");
                           grid.dataSource.read();
                        }
                      });
        });
      });
              </script>
            <button id="fetchmani" class="k-button" style="margin-left:15px;width:100px">Fetch Manifest</button>


// grid code
var routeid = 0;
                $(document).ready(function () {
                      dataSource = new kendo.data.DataSource({
                            transport: {
                                read:  {
                                    url: "data/fetchmani.php",
                                    dataType: "json",
                                    type:"POST"
                                },
                                parameterMap: function(options, operation) {
                                  return {
                                      id: routeid
                                  }
                              }
                            },
                            batch: true,
                            pageSize: 20,
                            serverPaging: true,
                            serverSorting: true,
                            serverFiltering: true,
                            schema: {
                            data:"data",
                            total:"total"
                            }
                        });
Atanas Korchev
Telerik team
 answered on 09 Aug 2013
5 answers
217 views
Hi all,

Here is what I am trying to do (unsuccessfully, I might add) and would appreciate any direction you can give me

From my Javascript kendo ui site, I want to upload a file to a cross domain WCF service that is hosted in Azure. 

In addition to uploading the files, I need to send additional parameters to the upload fucntion on the server

Is this possible to do?

Here is what my operationContract looks like:
[OperationContract]
[WebInvoke( Method = "POST",
UriTemplate = "/uploadmodeldata/?id={Id}&customerdatatype={customerdataType}&data={data}")]
void UploadModelData(string Id, string customerdataType, byte[] data);


How can I use the KendoUI upload widget to send files to this web service?

Do I trap the onUpload Event and call this? any ideas?


thanks,
Jas

T. Tsonev
Telerik team
 answered on 09 Aug 2013
3 answers
216 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
407 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
118 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.8K+ 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
188 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
215 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
78 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
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?