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

Grid collapsing on last page?

0 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kyle
Top achievements
Rank 1
Kyle asked on 06 Nov 2012, 07:28 PM
I'm trying to get my Grid to stay a static size no matter how many elements are visible on the page. Currently my first page of the grid looks lile this:
http://imgur.com/RAWx6

And my last page of the grid looks like this:
http://imgur.com/zL9na

I'm using the following code:
var gridDataSource = new kendo.data.DataSource({
    transport: {
        read: {
            url: "mysite",
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            type: "POST",
            data: function () {
                return {
                    param: value
                };
            }
        },
        parameterMap: function (options) {
            return JSON.stringify(options);
        }
    },
    schema: {
        model: {
            id: "id",
            fields: {
                name: { type: "string" },
                domain: { type: "string" },
                lastSeen: { type: "date" },
                os: { type: "string" }
            } // End of fields
        }, // End of model
        data: "Entries",
        total: "TotalCount"
    },
    sort: {
        field: "name",
        dir: "asc"
    },
    pageSize: 14,
    serverPaging: true,
    serverSorting: true,
    serverFiltering: true
});
 
var devicesDataGrid = $("#devicesGrid").kendoGrid({
    selectable: "row",
    dataSource: gridDataSource,
    autoBind: false,
    columnMenu: true,
    filterable: true,
    scrollable: false,
    sortable: true,
    resizable: true,
    height: 500,
    columns: [ { title: "Name", field: "name", template: "<a href='/GridVision/EditOrganizationDevice?organizationDeviceId=#= organizationDeviceId #'>#= name #</a>" },
                { title: "Domain", field: "domain" },
                { title: "Operating System", field: "os", template: '<div class="ellipsisCell" title="#= os #">#= os #</div>' },
                { title: 'Last Seen', field: 'lastSeen', template: "#= kendo.toString(lastSeen, 'MMMM dd yyyy, h:mm tt') #" }
                ],
    pageable: { input: true, numeric: false, info: true },
}).data("kendoGrid");
 
gridDataSource.read();

Any suggestions on how I can make the grid stay the same height no matter how many elements there are?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Kyle
Top achievements
Rank 1
Share this question
or