EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 04, 2024, 05:55:21 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
how to show a sort name&order icon when a datagrid is successfully loaded
Pages: [
1
]
« previous
next »
Print
Author
Topic: how to show a sort name&order icon when a datagrid is successfully loaded (Read 17166 times)
bakerchen
Newbie
Posts: 9
how to show a sort name&order icon when a datagrid is successfully loaded
«
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.
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: how to show a sort name&order icon when a datagrid is successfully loaded
«
Reply #1 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.
Logged
bakerchen
Newbie
Posts: 9
Re: how to show a sort name&order icon when a datagrid is successfully loaded
«
Reply #2 on:
April 10, 2013, 09:04:56 PM »
Thanks for quick response.
Is there any updated documents or demo to guide me?
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: how to show a sort name&order icon when a datagrid is successfully loaded
«
Reply #3 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
Logged
bakerchen
Newbie
Posts: 9
Re: how to show a sort name&order icon when a datagrid is successfully loaded
«
Reply #4 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>
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...