Telerik Forums
Kendo UI for jQuery Forum
1 answer
224 views
I have a datasource which could have any number of items, therefore the total of items will be unknown.  I would like to have a maximum of 10 items per page and would ideally like to scroll through these items using the endless scroll feature.  However, the endless scroll will continue to loop through the datasource items when the last item has been reached. 

I would like to use the endless scroll feature until the last item has been displayed and then this stops.  I will therefore need to perform a check  and stop returning records after all items have been requested.  The problem is, I have no idea where to start with implementing this.  I am using PHP.  Can anyone advise?

var DataSource = new kendo.data.DataSource({
     pageSize: 10,
      transport: {
          read: "data.php",
          dataType: "json",
    }
     sort: { field: "created", dir: "desc" },                                        
            
     });

  $("#list").kendoMobileListView({
              dataSource: DataSource,
              pullToRefresh: true,
              appendOnRefresh: false,    
              endlessScroll: true,
              scrollTreshold: 30, //treshold in pixels                            
              style: "inset",       
              template: $("#list").text()
          });

I assume I need to use the serverPaging and page  attributes that are in the documentation but this does not give any examples that help.
Georgi Krustev
Telerik team
 answered on 27 Jul 2012
2 answers
348 views
hi,
Is there any way to change the style from normal to tool tip like Silverlight when the mouse goes over the text-box and then the error appear? instead of having it on the side of the textbox?

thanks
James
Top achievements
Rank 1
 answered on 27 Jul 2012
1 answer
308 views
Below is the code that i have written. On click of create/update data is not being send to webapi layer and on every click it is calling create operation. Help me to resolve the above issue.

(function ($) {
    // Update API url
    var UPDATEUSER_API_URL = 'api/UserManagement/PostUpdateUser';
    // Delete API url
    var DELETEUSER_API_URL = 'api/UserManagement/DeleteUser';
    // Search API url
    var GETUSER_API_URL = 'api/UserManagement/GetUser';
    // Search By Id API url
    var GETUSERBYID_API_URL = 'api/UserManagement/GetUserById';


    $(function () {
        debugger;
            dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: GETUSER_API_URL,
                        dataType: "json"
                    },
                    update: {
                        url: UPDATEUSER_API_URL,
                        contentType: 'application/json;charset=utf-8',
                        dataType: "json",
                        type: "PUT"
                    },
                    destroy: {
                        url: DELETEUSER_API_URL,
                        contentType: 'application/json;charset=utf-8',
                        type: "DELETE",
                        dataType: "json",
                    },
                    create: {
                        url: UPDATEUSER_API_URL,
                        dataType: "json",
                        type: "POST",


                    },
                    parameterMap: function (options, operation) {
                        if (operation !== "read" && options.models) {
                            return { models: kendo.stringify(options.models) };
                        }
                    }
                },
                batch: true,
                pageSize: 10,
                schema: {
                    model: {
                        id: "UserProfileID",
                        fields: {
                            UserProfileId: { validation: { required: false } },
                            Password: {type: "string", validation: { required: true } },
                            Username: { editable: true, validation: { required: true } },
                            FirstName: {type: "string", validation: { required: true } },
                            LastName: {type: "string", validation: { required: true } },
                            EmailId: {type: "string", nullable: false, validation: { required: true } },
                            IsSuperUser: { type: "boolean", validation: { required: false } },
                            RoleName: {nullable: false, validation: { required: true } },
                        }
                    }
                }
            });
        debugger;
        $("#grid").kendoGrid({
            dataSource: dataSource,
            pageable: true,
            height: 400,
            toolbar: ["create"],
            columns: [
                "Username",
                { field: "Password", title: "Password", width: "1px" },
                "FirstName",
                "LastName",
                { field: "EmailId", title: "Email Id", width: "170px" },
                { field: "IsSuperUser", title: "SuperUser", width: "90px" },
                { field: "RoleName", title: "Roles", width: "90px"  },
                { command: ["edit", "destroy"], title: " ", width: "210px" }],
            editable: "popup"
        });
    });
Ednei
Top achievements
Rank 1
 answered on 27 Jul 2012
1 answer
685 views
hi,
im passing in a datasource for my grid schema, however the row ID (data-uid) isn't getting set to the ID of the datasource?

(i'm upgrading from v2011.3.1407 to v2012.2.710)

ok found a way:
var dataRow = $("#grid").data("kendoGrid").dataSource.getByUid(row.data("uid")); 

datarow contains "id" and another other property you assigned to it. 
Atanas Korchev
Telerik team
 answered on 27 Jul 2012
5 answers
329 views
Hi,
I have found that if you navigate to a view, and use the back button on the second view to jump back to the first, if you are using a touch device and hold the back button too long, it will trigger a double-click event and activate any controls on the original page that are in the same spot as the back button.

I have constructed an isolated application that can reproduce this erroneous behavior using kendo v2012.2.710.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head>
        <title>Kendo Link Double Clicking</title>
        <script src="jquery-1.7.2.min.js" type="text/javascript"></script>
        <script src="kendo.mobile.min.js" type="text/javascript"></script>
        <link href="kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
 
    </head>
     
    <body>
 
        <!-- View 1 -->
        <div id="one" data-role="view">
                    
            <div class="km-navbar" data-role="navbar">
                <input id="searchInput" type="search" data-align="left" placeholder="Search Box"/>
                Page 1
            </div>
            <br />
            <span>Click the button to be taken to the 2nd page</span>
            <br />
            <br />
            <a data-role="button" href="#two">Go To Page 2</a>
     
        </div>
                 
        <!-- View 2 -->
        <div id="two" data-role="view">
            <div class="km-navbar" data-role="navbar">
                <a data-role="backbutton" class="km-button km-back" href="#:back" data-align="left">Back</a>
                Page 2
            </div>
            <br />
            <span>Possible Bug: On a touch device, holding the back button for too long will trigger a double click.</span><br />
            <span>If there is an textbox in the same place on the new page as the button pressed, it will be set into focus.</span><br />
            <span>If there is a soft keyboard, it will also activate.</span><br /><br />
        </div>
 
    </body>
    <script type="text/javascript">
        var app = new kendo.mobile.Application($(document.body));
    </script>
</html>

Any help with a fix is greatly appreciated.

Thanks
John
Kamen Bundev
Telerik team
 answered on 27 Jul 2012
2 answers
690 views
I'm trying to filter a tabstrip using the selection of a local datasource.  How do you completely reload the tabstrip, adjusting for the new filtered datasource?

Attached is a fiddle with an example... obviously I didn't wire up the reload event because I didn't know where to go with it.

http://jsfiddle.net/clechner/pnRnA/



Clint
Top achievements
Rank 1
 answered on 27 Jul 2012
1 answer
104 views
I tried to CSS style the slider with a percentage width of it's container (100%), this made the slider go for three lines (since the top level window is very large).

I am actually using this as a progress meter, So I suppose I should disable it, but the faded look is not what I am looking for. All I want to do is remove the thumb of the slider, not a big issue, but it might be something to consider.

Also, since it is a progress meter, data-binding would be nice.

Hristo Germanov
Telerik team
 answered on 27 Jul 2012
0 answers
228 views
Hi,

i put a form inside a view... in a tabstrip, now i want to try to change the view content (with a listview).... i tryed this but it don't work, the refresh with jquery fully break kendo ui!:

<div id="figa" data-role="view" data-title="Form Elements" data-init="initForm"  data-layout="mobile-tabstrip">
    <form action="/newOrdine/" method="post">
        <ul data-role="listview" data-style="inset">
            <li>
                <select>
                    <option value="First Option">First Option</option>
                    <option value="Second Option">Second Option</option>
                    <option value="Third Option">Third Option</option>
                    <option value="Fourth Option">Fourth Option</option>
                </select>
                Select element
            </li>
        </ul>
    </form>
    <a class="button" data-role="button" type="submit">Home</a>
    <a class="button" data-role="button" onclick="javascript:submitForm();">Facility</a>
    <a class="button" data-role="button" href="#sports" style="background-color: #f60">Sports</a>    
</div>


<script>
    function submitForm() {
        alert('a');
        //$("#container").empty().html('<img src="/static/indicator.gif"/>');
        var nome = 'pippo';
        $('#figa').load('/newOrdine/', {'nome':nome});
    }
</script>


Vanni
Top achievements
Rank 1
 asked on 27 Jul 2012
0 answers
97 views

Hi,

I know that the dataBound event is fired when sorting occurs. This event is generic however, and I cannot tell whether it is being fired as a consequence of sorting.

Is there a way to handle only the sorting event?

Thanks
Simon
Top achievements
Rank 1
 asked on 27 Jul 2012
0 answers
94 views
  1. Is there integration with other technologies?
koyel
Top achievements
Rank 1
 asked on 27 Jul 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
Drag and Drop
Application
Map
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
Licensing
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
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
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?