Title: how to show a sort name&order icon when a datagrid is successfully loaded Post by: bakerchen on April 08, 2013, 09:30:40 PM After a datagrid is successfully loaded, there is no default sort icon indicator displayed on the table header.
You need click a column of table header to see a sort icon. my question is: can I set a default sort name&order and show a sort icon when a datagrid is successfully loaded at the first time? no need user to click the column of table header. Title: Re: how to show a sort name&order icon when a datagrid is successfully loaded Post by: stworthy on April 10, 2013, 07:24:34 AM Please download the updated datagrid plugin from http://www.jeasyui.com/easyui/plugins/jquery.datagrid.js to solve this issue.
Title: Re: how to show a sort name&order icon when a datagrid is successfully loaded Post by: bakerchen on April 10, 2013, 09:04:56 PM Thanks for quick response.
Is there any updated documents or demo to guide me? Title: Re: how to show a sort name&order icon when a datagrid is successfully loaded Post by: stworthy on April 11, 2013, 06:22:15 PM Please refer to this example http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=Sorting
Title: Re: how to show a sort name&order icon when a datagrid is successfully loaded Post by: bakerchen on April 11, 2013, 07:40:16 PM Thank you stworthy.
I can see it works well as what I expect on the live demo. But it looks like this does not work on my test page, what's wrong with me? I have downloaded the updated datagrid plugin file you gave on the previous thread to my site. here is my part html codes. <table id="dg-user" class="easyui-datagrid" title="" iconCls="toolabar-icon-gear" fit="true" pagination="false" sortName="username" sortOrder="asc" data-options="rownumbers:false,singleSelect:false,fitColumns:true,url:'ajax.user.php'"> <thead> <tr> <th data-options="field:'id',checkbox:true"></th> <th field="username" width="200" sortable="true">Username</th> <th field="realname" width="200" sortable="true">Realname</th> <th field="email" width="200" sortable="true">Email</th> <th field="date_created" width="150" formatter="formatUnixTimeStamp" align="center" sortable="true">Date Created</th> <th field="date_last_visit" width="150" formatter="formatUnixTimeStamp" align="center" sortable="true">Last Visited</th> <th field="status" width="70" align="center" formatter="formatStatus" sortable="true">Status</th> </tr> </thead> </table> |