This is a migrated thread and some comments may be shown as answers.

Filtering on tablets

4 Answers 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
axel
Top achievements
Rank 1
axel asked on 22 Feb 2013, 04:07 PM
Hello,

I'm using a grid in a mobile app.
When I scroll down to the bottom of a page and filter a few records, the grid is empty.
Pls take a look at the attached screenshots.

Regards
Axel


4 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 26 Feb 2013, 04:28 PM
Hello Axel,

Actually the Grid is filtered, however it is not scrolled back to the top (this is default browser's behavior). If you wish the Grid to be scrolled top when filtered you should hook up to its dataBound event and manually scrollTop().

Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
axel
Top achievements
Rank 1
answered on 01 Mar 2013, 02:29 PM
Hi iliana,

still empty.
by the way. when i rotate the iPad, the grid is filled.

            $("#gridAirlines").kendoGrid({
                dataSource: _dsAirlines,
                dataBound: function () {
                    $("#gridAirlines").scrollTop();
                },
                sortable: true,
                selectable: "row",
                pageable: {
                    buttonCount: 5,
                    pageSize: 50,
                    info: false
                },
                filterable: {
                    extra: false,
                    messages: {
                        info: "Show airlines with value that:"
                    },
                    operators: {
                        string: {
                            startswith: "Starts with"
                        }
                    }
                },
                columns: [{
                    field: "code",
                    width: 80,
                    filterable: true,
                    title: "Code"
                }, {
                    field: "name",
                    filterable: true,
                    title: "Airline"
                }]
            });

Kind regards
Axel
0
Iliana Dyankova
Telerik team
answered on 05 Mar 2013, 02:14 PM
Hi Axel,

I believe the following approach will help to achieve the desired outcome:
  • In the Grid's dataBound event get the mobile scroller from .k-grid-content; 
  • Scroll to top using Kendo UI Mobile Scroller's scrollTo() method.
 For your convenience here is a simple HTML page which demonstrates the suggested approach in action.
  
Kind regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
axel
Top achievements
Rank 1
answered on 06 Mar 2013, 10:16 AM
Hello,

for the sake of completeness, if you have to navigate to the grid.

                    var scroller = $(".k-grid-content").data("kendoMobileScroller");

                    if (!scroller)
                        return;

                    scroller.scrollTo(0,-10);

works perfectly.
thank you iliana
Tags
Grid
Asked by
axel
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
axel
Top achievements
Rank 1
Share this question
or