Telerik Forums
Kendo UI for jQuery Forum
1 answer
101 views
I am using a view to load a project list after a success login.  When a user land to the page after success login i am getting data from api inside a kendo datasource logic. When i see the console my api url call twice. I dont understand why its calling twice.

My index.html

<!DOCTYPE HTML>
<html>
    <head>
        <link href="kendo/styles/kendo.mobile.all.min.css" rel="stylesheet" />
        <link href="css/main.css" rel="stylesheet" />
    </head>
    <body>
        <div data-role="layout" data-id="home-layout">
            <header data-role="header">
                <div data-role="navbar">
                    <span data-role="view-title"></span>
                </div>
            </header>
  
            <div data-role="footer">
                <div data-role="tabstrip">
                    <a href="#home-view" target="_blank" data-icon="home">Home</a>
                    <a href="#login-view" data-icon="contacts">login</a>
                    <a href="#about-us" data-icon="about">About</a>
                </div>
            </div>
        </div>
        <div data-role="layout" data-id="account-layout">
            <header data-role="header">
                <div data-role="navbar">
                    <span data-role="view-title"></span>
                    <span data-role="button" data-bind="click: logout" data-align="right">Log Off</span>
                </div>
            </header>
            <div data-role="footer">
                <div data-role="tabstrip">
                    <!-- <a href="#home-view" data-icon="home">Home</a> -->
                    <a href="#login-view" data-icon="contacts">login</a>
                    <!-- <a href="#about-us" data-icon="about">About</a> -->
                </div>
            </div>
        </div>
        <div data-role="view" id="login-view" data-layout="account-layout" data-model="app.accountView.viewModel"  data-init="app.accountView.navigate" data-before-show="app.accountView.navigate" data-title="Log In" style="display: none;">
            <p>
                For demonstration purposes Login example
            </p>
            <ul>
                <li>
                    <strong>Username:</strong> owner
                </li>
                <li>
                    <strong>Password:</strong> p@ssword123
                </li>
            </ul>
  
            <input type="text" placeholder="Username" data-bind="value: loginUsername" required data-required-msg="Enter a valid usernmae"/>
            <input type="password" placeholder="Password" data-bind="value: loginPassword" required data-required-msg="Enter a valid password"/>
            <input type="url" data-bind="value: serverURL" required data-url-msg="Enter a valid url for server"/>
            <div type="button" data-role="button" data-bind="click: login">
                Log In
            </div>
        </div>
  
        <div data-role="view" id="home-view" data-layout="home-layout" data-title="Home"  data-show="app.homeView.initializeHome">
            <ul id="myProjectCustomListView"></ul>
        </div>
        <script id="myProjectCustomListViewTemplate" type="text/x-kendo-template">
        <a href="projectDetail.html" id="${ProjectId}">
            <h3 class="item-title">${ProjectName}</h3>
            <p class="item-info">Created Date: ${CreateDate}</p>
        </a>
    </script>
        <!-- <script src="cordova.js"></script> -->
        <!-- RequireJS is a JavaScript file and module loader(Below main.js file is set to load) -->
        <script data-main="scripts/main.js" src="scripts/require.js"></script>
    </body>
</html>



My home-view.js


define(["jQuery", "kendo", "utils", "common"], function($, kendo, utils, common) {
     
    return {
         
     initializeHome :function() {
            console.log("home view initialized")
             
            var dataSource = new kendo.data.DataSource({
             transport: {
                 read: {
                     url: "http://127.0.0.1/api/getprojects",
                      
                     dataType: "json",
                      
                     cache: false
                 }
             },
         });
          
         dataSource.fetch(function() {/** To check how many data are fetched like a total count for reference */
              console.log(dataSource.view().length); // displays "77"
         });
          
         $("#myProjectCustomListView").kendoMobileListView({
             dataSource: dataSource,
             template: $("#myProjectCustomListViewTemplate").html(),
         });
     },
    };
});



The above api is fetching the result and show correct, the only thing is it is called twice whenever i load this home-view. I have verified in the console firefox browser. Kindly help this what is the issue with run twice.
Petyo
Telerik team
 answered on 27 Sep 2013
2 answers
66 views
Is there a link to get the API details for jquery?

<script>
    $("#scheduler").kendoScheduler({        
        date: new Date("2013/6/6"),        
        allDayEventTemplate: $("#event-template").html(),        
        dataSource: [
          {
              id: 1,
              start: new Date("2013/6/6 08:00 AM"),
              end: new Date("2013/6/6 09:00 AM"),
              isAllDay: true,
              title: "Interview",
              atendees: [1, 2]
          }
        ],
        resources: [
          {
              field: "atendees",
              dataSource: [
               { value: 1, text: "Alex" },
               { value: 2, text: "Bob" }
              ],
              multiple: true
          }
        ]
    });
</script>
Rosen
Telerik team
 answered on 27 Sep 2013
1 answer
57 views
Hi!

This is my example of overflow chartarea. http://jsbin.com/oRuvimI/2/edit?html,css,output
Hristo Germanov
Telerik team
 answered on 27 Sep 2013
12 answers
880 views
Hi, i am trying to set the first day of week to Monday:

This code:

 kendo.culture().calendar.firstDay = 1;

works well for DatePicker, but not for Scheduler (WeekView, MonthView).
Is there any workarounds?
Ana
Top achievements
Rank 1
 answered on 27 Sep 2013
1 answer
60 views
So I've been working on an autocomplete for a state grid field. Everything (for the most part) works fine, accept for about half the states
will display [object Object].

For example, if you add a new record and select New Hampshire as your state it will return [object Object]

Any help would be greatly appreciated!

http://jsbin.com/ohimef/42/edit 
Alexander Popov
Telerik team
 answered on 27 Sep 2013
2 answers
103 views
Hi, 

this is perhaps a simple matter, I would like to ensure the search bar is a lot easier to hit with my fingers.  This renders really nicely (e.g. larger) on iOS 6 but as soon as I put this onto iOS 7 it's tiny. 

I'd like to increase it's vertical height. 

here's a picture of what the search bar looks like on iOS7: https://www.evernote.com/shard/s7/sh/e254e198-74f4-473a-8148-50f6bd879988/b5dd6c1a37393840b9df3d45c82620a1/deep/0/Screen%20Shot%202013-09-26%20at%2015.30.38.png

Thanks.
Kiril Nikolov
Telerik team
 answered on 27 Sep 2013
1 answer
261 views

Hi,

I have created the ken-do list-view with paging. The pager of the list-view constantly changing its position based on the list-view data. Is there any option to display
pager at the fixed position regardless of the list-view records.

say for an example  I have set the page-size of the list view to 8. if the next records contains only 2 records then the pager position is moved to the top. I need to set
the fixed position for the pager regardless of the list-view records it possible to obtain?




Thanks,
vinoth arnold

Kiril Nikolov
Telerik team
 answered on 27 Sep 2013
3 answers
385 views
I have been using the example KendoUI MVC4 samples with generally good success. However, some of the CSS styles such as k-add-button, k-edit-button and k-update-button show up as 'Unknown CSS class ...' in Visual Studio editor in my Razor view files. I could not find where these styles are defined, either in my project or in the KendoUI distribution. Since I am having a problem with the ListView MVC 4 example (the 'Add new record' button does not work), I suspect it may be related to the undefined k-add-button style. My _Layout.cshtml file contains the following references:
<link href="@Url.Content("~/Content/kendo/2013.2.716/kendo.common.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2013.2.716/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2013.2.716/kendo.default.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2013.2.716/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/kendo/2013.2.716/jquery.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2013.2.716/kendo.all.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2013.2.716/kendo.aspnetmvc.min.js")"></script>
Steve
Top achievements
Rank 1
 answered on 27 Sep 2013
3 answers
124 views
http://www.kendoui.com/code-library/mobile/listview/listview---mvvm-crud-operations.aspx

This MVVM Crud example has a problem with the Details view.  When you select the Action button for a product and click the Details button, it displays the correct product information.  But from then on, it will always only show that same product, not the one that you are selecting.
FYI.
King Wilder
Top achievements
Rank 2
 answered on 27 Sep 2013
3 answers
155 views
I'm currently evaluating Kendo UI, and I've found a problem I can't get past. I can't manually update the page value on my datasource.

The code is very simple. When I click a button, I retrieve the value for page off the datasource for a combobox. I increment it by 1, and then I set the new value on the datasource. The problem is that it is not actually updating the page.

$(document).ready(function(){
    
    var MyDataSource, $MyComboBoxRef, $dataMyComboBox;
    
    MyDataSource = new kendo.data.DataSource({
        
        batch:true,
        serverFilter: true,
        serverPaging: true,
        pageSize: 10,
        schema: {
            total:"total",
            data: function(response){

                return response.options
            }
        },
        transport: {
            read: {
                dataType: "json",
                url: "/MyService",
                type: "POST",
                async: false,
                data: function(options) {
    
                    var MyComboBox = $("#MyComboBox").data("kendoComboBox"),
                        query = MyComboBox.text(),
                        $dataMyComboBox = $dataMyComboBox;

                    query = query == null || query == "" ? "*" : query;

                    return {
                        action:    "QueryMyComboBoxOptions",
                        query:   query,
                        page: options.page,
                        page_limit: options.pageSize
                    };
                }
            }        
        }
        
    });
    
    $MyComboBoxRef = $("#MyComboBox");
    $MyComboBoxRef.kendoComboBox({
        
        autoBind:false,
        minLength: 21,
        dataSource: MyDataSource,
        dataTextField: "text",
        dataValueField: "id"
    });
    
    $dataMyComboBox = $MyComboBoxRef.data("kendoComboBox");
    
    $('#submitBtn').click(function(){
        
        var page = $("#MyComboBox").data("kendoComboBox").dataSource.page();
        alert("Page: " + page);//Page: 1
        page = page +1;
        alert("Page: " + page);//Page: 2
        $("#MyComboBox").data("kendoComboBox").dataSource.page(page);//MyService is pinged, but page is passed back with a value of 1?
        page = $("#MyComboBox").data("kendoComboBox").dataSource.page();
        alert("Page: " + page);//Page: 1 .. ? Why isn't it updateing?'
    });
});

Alexander Valchev
Telerik team
 answered on 26 Sep 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?