Telerik Forums
Kendo UI for jQuery Forum
3 answers
148 views
I have downloaded and extracted the Kendo UI examples to my local PC.  I setup an IIS application and mapped it to the web examples folder.  However, when I attempt to run the web examples such as SPA Sushi, the following page content is displayed:

Note:
Security restrictions prevent this example from working in all browsers when the page is loaded from the file system (via file:// protocol). If the demo is not working as expected, please host the Kendo folder on a web server.

I am running the app through IIS (e.g. http://localhost/KendoUI/web/spa/Sushi.html) on a PC using 64 bit Windows 7.

Any ideas on how to resolve this?

thanks
Petyo
Telerik team
 answered on 13 Mar 2014
6 answers
251 views
Is it possible to use Markdown within the Kendo editor? I have spent a few days trying to find this and cannot. I was under the impression that the parsing engine could be substituted.
Stacey
Top achievements
Rank 1
 answered on 13 Mar 2014
3 answers
133 views
Hi,

I have the grid and the model below. Everything works but getSum, I get a "getSum is not defined" error. Any idea?

    <div class="k-widget" 
      data-role="grid"
      data-bind="source: nbh"
      data-columns="[{title: 'Tâche', field: 'task'}, {title: 'Heures', field: 'hours', width: '125px', format: '{0} h', aggregates: ['sum'], 
        footerTemplate: 'Total: #= data.hours? data.hours.sum: 0 # h'}, {title: 'Personnelle', field: 'personal', hidden: true, 
        groupHeaderTemplate: '#= value? \'Projets\':\'Tâches personnelles\'# (#= getSum(value) # h)'}]">
    </div>

bound to this model:

        var model = kendo.observable({

            nbh: new kendo.data.DataSource({
                aggregate: [{ field: "hours", aggregate: "sum" }]
            }),

            getSum: function (value) {
                var datasource = this.nbh;
                var result;
                //loops through the dataSource view
                $(datasource.view()).each(function (index, element) {
                    //compares view value with the current template value
                    if (element.value === value) {
                        result = element.aggregates.hours.sum; //gets the aggregate value
                    }
                });

                return result;
            }

        });

Thanks,

Alexis

Daniel
Telerik team
 answered on 13 Mar 2014
1 answer
58 views
Hello,

i build a mobile web for our company using for our BlackBerry Z10.

When using a form with some inputs ... the tabstrip moves up when onscreen keyboard comes up.
Is there a way to prevent tabstrip moving with onscreen keyboard ?

I readed some threads here but the solutions there doesn`t work for me.

Regards

Jürgen
Kiril Nikolov
Telerik team
 answered on 13 Mar 2014
1 answer
274 views
I am creating folders in tree structure like we have windows explorer.My requirement is that if I am dropping a node into another node and the target node already contains a node with the same name as of source node then the source node should be placed back to its original position.The checking of same node name takes place in the controller and it returns false if it's duplicate.At this moment, I want to move the node at it's original position.I have tried e.setValid(false) and e.preventDefault() but it's not working. Please provide me the solution.
Alexander Popov
Telerik team
 answered on 13 Mar 2014
2 answers
98 views
Hi,
I have this grid example:
http://plnkr.co/edit/Oh5wApcRePJqNv0F31HJ?p=preview
In it, I state that one field will be to type: "date".
In the array creation, every corresponding element is equal to "new Date()".
Nevertheless, in the grid itself, the value appears as a string.
Any idea why?
OMER
Top achievements
Rank 1
 answered on 13 Mar 2014
2 answers
62 views
Hello,

This is what I've got: http://jsbin.com/EdijIyEG/19/edit?html,js,output

31 (default is 25) is largest I could have, is it possible to make it taller without expanding the height of the scheduler?


Thanks,
Kyle


Kyle
Top achievements
Rank 1
 answered on 13 Mar 2014
1 answer
306 views
Hi,
   I have a problem getting the Hierarchical Data Source to work with a CORS configured WebAPI server whereas a standard Data Source works fine for a grid.  My sample code for a working grid on a CORS data source is as follows:

var buildTestGrid = function () {
        // Setup Data Source
        var ds = new kendo.data.DataSource({
            transport: {
                read: function (options) {
                    console.log("Setting-up testGrid");
                    console.log("Token: " + token);
                    $.ajax({
                        cache: false,
                        url: getUrl("api/v1/items(parent_id=null,is_template=false)"),
                        type: "GET",
                        headers: { "X-Token": token },
                        success: function (response) {
                            console.log("Test Grid... it's ALIVE!");
                            if (response == null || response == "null")
                                console.log("ERROR: No response");
                            else {
                                options.success(response);
                            }
                        },
                        error: function (xhr, status, error) {
                            console.log("Test Grid Error");
                        },
                    });
                },
                batch: true
            },
            pageSize: 10
        });


        // Now configure the grid
        $("#testGrid").kendoGrid({
            dataSource: ds,
            groupable: false,
            sortable: true,
            pageable: {
                refresh: true,
                pageSizes: true,
                buttonCount: 5
            }
        });
    }

However, the data source fails when building a tree control using the following code:

    var buildTestTree = function () {
        // Setup the data source
        var ds = new kendo.data.HierarchicalDataSource({
            transport: {
                read: function (options) {
                    console.log("Setting-up testGrid");
                    console.log("Token: " + token);
                    $.ajax({
                        cache: false,
                        url: getUrl("api/v1/items(parent_id=null,is_template=false)"),
                        dataType: "json", // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
                        type: "GET",
                        headers: { "X-Token": token },
                        success: function (result) {
                            console.log("Test Tree... it's ALIVE!");
                            if (result.length == 0) {
                                console("ERROR: No response");
                            }
                            options.success(result);
                        },
                        error: function (result) {
                            console.log("Test Tree Error");
                            options.error(result);
                        }
                    });
                },
            }
        });


        $("#testTree").kendoTreeView({
            animation: {
                collapse: {
                    duration: 400,
                    effects: "fadeOut"
                },
                expand: {
                    duration: 400,
                    effects: "fadeIn"
                }
            },
            dataSource: ds,
        }).data("kendoTreeView");
    }

Strangely if I configure my service to just return an error message the GET request works fine, but when the tree actually get's data it appears to make a second call and gives the following error:

OPTIONS <URL> 405 (Method Not Allowed) jquery-1.9.1.js:9597
OPTIONS <URL> Invalid HTTP status code 405 jquery-1.9.1.js:9597
XMLHttpRequest cannot load <URL>. Invalid HTTP status code 405 

Thanks










Alex Gyoshev
Telerik team
 answered on 13 Mar 2014
1 answer
70 views
It's possible?
Kiril Nikolov
Telerik team
 answered on 13 Mar 2014
3 answers
102 views
Hello everyone, I'm losing the style when I sets new data to my ListView, I'm using the flat style and when the ListView read the data from the controller for first time, the list view displays the items correctly as you can see in the image 1. But when the user execute a search function, and reload the list with new data, I lose the style as you can see in the image2.

This is my mobile list view
@(Html.Kendo().MobileListView()
              .Name("listview")
              .TemplateId("tmp")
              .HeaderTemplateId("htmp")
              .DataSource(datasource => datasource
                          .Read(r => r.Action("Study_Read", "Home").Data("searchparameter"))
                          .PageSize(20)
                          .ServerOperation(true)
                          .Group(g => g.Add("PatientName", typeof(string)))
                          )
          )
my templates

<script type="text/x-kendo-template" id="tmp">
         <div data-role="content" style="width:100%;">
         <table style="width:100%; border-width:2px;">
         <tr  style="border-width:thin;">
           <td style="width:33%">
               #=Description #
           </td>
           <td style="width:33%">
               #=Modality #
           </td>
           <td style="width:33%">
               #=StudyDate #
           </td>
           <td>
               <div style="background-color:WhiteBlue;">
                     Status Report
               </div>
           </td>
           <td    style="right:0px; width:33%">
            <div style="position:relative; right:0px;">
               <a data-role="button" class="view" data-click="onClick" id="#=StudyId#">View</a>
            </div>
           </td>
         </tr>
         
         </table>
          
         </div>
   </script>
   <script type="text/x-kendo-template" id="htmp">
        <p><h4> #= value #</h4> </p>
   </script>

And the javascript function that I'm using to set the new data, the comments lines was the options that I test to solve the issue, but any works

function advancedsearch(e) {
    var patientId = $("#txt_patient_id").val();
    var patientName = $("#txt_patient").val();
    var modality = $("#ddlModality option:selected").text();
    var startDate = $("#start_date").val();
    var endDate = $("#end_date").val();
    var headerTemplate = kendo.template($("#htmp").html());
    var template =kendo.template($("#tmp").html());
    //var totalTemplate = headerTemplate.concat(template);
    alert(endDate)
    $.ajax({
        type:"POST",
        url: '@Url.Action("Advanced","Home")',
        data:{
                patientId: patientId,
                patientName: patientName,
                modality: modality,
                startDate: startDate,
                endDate: endDate
            },
        success: function (evt) {
            console.log(evt);
             
            var dataSource = new kendo.data.DataSource({
                pageSize:20,
                data: evt,
                schema: {
                    data: "Data",
                    total:"Total"
                }
                /*,
                 change: function (e) {
                     if (this.view()[0]) {
                         console.log(template);
                         $("#listview").html(kendo.render(template, dataSource.view()));
                         kendo.mobile.init($("#listview"));
                     }
                 }*/
            });
            $("#listview").data("kendoMobileListView").setDataSource(dataSource);
            //dataSource.read();
            //$("#listView").kendoMobileListView({
            //    dataSource: evt,
            //    template: kendo.template($("#tmp").html())
            //});
 
            //$("#listview").kendoMobileListView({
            //    dataSource: evt,
                
                //template: $("#tmp").text()
            //});
            //$("#listview").data('kendoMobileListView').dataSource.read(evt);
        }
    });
}

What is the problem?
Kiril Nikolov
Telerik team
 answered on 13 Mar 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
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
Chat
DateRangePicker
Dialog
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?