EasyUI Forum

General Category => General Discussion => Topic started by: zurfero on April 15, 2014, 05:54:49 AM



Title: Datagrid Problem - When change PageList not select the first record of list
Post by: zurfero 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?


Title: Re: Datagrid Problem - When change PageList not select the first record of list
Post by: stworthy 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">