EasyUI Forum
March 29, 2024, 04:13:30 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [Solved] Pagination datagrid bug NaN  (Read 7887 times)
danny36
Newbie
*
Posts: 9


View Profile Email
« on: July 05, 2017, 12:42:13 AM »

Hello,

I have a personal application written some years ago and now I'm tring to update jeasyui to the latest version 1.5.2 but I think foun a bug on all pagination of datagrid that I have in my application.

This is my code of one table datagrid:

$('#tabella_iscritti').datagrid({
             title:'Elenco iscritti',
             url:'iscritti.php?action=list',
             striped: true,
             fitColumns: true,
             singleSelect: true,
             method:'get',
             method: 'get',
             pagination: true,
             pageList: [100,150,200,300,500],
             rownumbers : true,
             loadMsg: 'Attendere caricamento dati!',
             columns:[[
                 {field:'dorsale',title:'Dorsale', width: 20},
                 {field:'nome',title:'Nome', width: 100},
                 {field:'nome_societa',title:'Societa', width: 100},
                 {field:'categoria',title:'Cat.', width: 20},
                 {field:'anno',title:'Anno', width: 20}
             ]]
         });
« Last Edit: July 05, 2017, 03:14:36 AM by danny36 » Logged
danny36
Newbie
*
Posts: 9


View Profile Email
« Reply #1 on: July 05, 2017, 12:46:28 AM »

The datagrid on load it's empty because the rows parameter in get it's NaN. If I change the numbers of rows in the datagrid dropdown the data it's display.

If I remove pageList attribute from datagrid properties the data it's display.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #2 on: July 05, 2017, 01:37:36 AM »

Since you reset the 'pageList', the 'pageSize' property should be specified.
Code:
$('#tabella_iscritti').datagrid({
  pageList: [100,150,200,300,500],
  pageSize: 100
});
Logged
danny36
Newbie
*
Posts: 9


View Profile Email
« Reply #3 on: July 05, 2017, 03:14:05 AM »

Ok thank you, I miss this property because in old version of jeasyui it's not required in pagination.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!