EasyUI Forum
May 02, 2024, 11:20:59 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datagrid Problem - When change PageList not select the first record of list  (Read 12355 times)
zurfero
Newbie
*
Posts: 15


View Profile
« on: April 15, 2014, 05:54:49 AM »

Hello.
When I define a datagrid in which I change the default values of pageList for example to this [25,50,100,500]. When load datagrid,  it's not selected the first item of combo pageList, I mean the number 25.

If I define pageList with this [10,50,100,500], select the first item correctly..., looks like that if the first item it's not the number 10 , not selected.

For example

 <table id="dg_my_datagrid" class="easyui-datagrid"
                   data-options="url:'load.php'" title="Example datagrid"
                   nowrap="false" striped="true" fitColumns="true" fit="true" showFooter="true"
                   pagination="true" rownumbers="true" singleSelect="true" pageList="[25,50,100,500]"
                   toolbar="#toolbar_dg_my_datagrid">


Is it a bug ?¿ or you can help me to select in my datagrid the first item of pageList?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: April 15, 2014, 05:45:32 PM »

You need to define the 'pageSize' property to let datagrid initialize the page size value.

<table id="dg_my_datagrid" class="easyui-datagrid"
                   data-options="url:'load.php'" title="Example datagrid"
                   nowrap="false" striped="true" fitColumns="true" fit="true" showFooter="true"
                   pagination="true" rownumbers="true" singleSelect="true" pageSize="25" pageList="[25,50,100,500]"
                   toolbar="#toolbar_dg_my_datagrid">
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!