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

Grid-pager popup problem

2 Answers 241 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marcel
Top achievements
Rank 1
Marcel asked on 03 Dec 2013, 07:27 PM
Hello,

I'm using Kendo UI to create a SPA business application, which works perfect, except for 1 thing concerning the kendo Grid.
Since the last version, i noticed the pager popup is being appended to the body instead of the container element in which a view is shown.
Normally this wouldn't be so much of a problem, except that detaching a view with a grid doesn't detach the pager popup.
So when switching back and forth between different views, pager popups keep getting appended to the body.

I attached 2 files.
1 shows 4 divs with the pager popup, the result after switching views 4 times.
the other one shows the grid itself.

The page options are being set through creating the grid.
$('#business-grid').kendoGrid({
            dataSource: that._businessDatasource,
            autoBind: false,
            sortable: true,
            selectable: "row",
            navigatable: true,
            pageable: {
                refresh: true,
                pageSizes: [5, 10, 15, 20],
                messages: {
                    display: "{0} - {1} van {2} bedrijven",
                    itemsPerPage: "bedrijven per pagina"
                }
            }
}
I hope this is a bug and can be fixed.

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 05 Dec 2013, 01:42 PM
Hello Marcel,

I have tried to reproduce the problem, but to no avail. Please check the following code and tell me if I missed something:

http://jsbin.com/ItAdEyu/2

On a side note, are you sure that you are not initializing the Grid every time you navigate to the view? Because this this is one of the possible reasons to get the pager pop-up initialized multiple times.

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Marcel
Top achievements
Rank 1
answered on 06 Dec 2013, 08:47 AM
Hi Kiril,

You were right and it was a mistake on my side.
The old view never got destroyed, the view element only got detached.
So kendo.unbind never got called.
I fixed that in my code and it works like a charm.

Thanks for the answer.
Tags
Grid
Asked by
Marcel
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Marcel
Top achievements
Rank 1
Share this question
or