EasyUI Forum
May 02, 2024, 12:18:57 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: Sorting by a hidden column.  (Read 5035 times)
dacracot
Newbie
*
Posts: 6


View Profile
« on: August 14, 2015, 10:49:31 AM »

I've a datagrid with three columns:
Code:
{field:'file',title:'File',width:228},
{field:'percent',hidden:true},
{field:'progress',title:'Progress',width:100}
.

The progress column contains a progress bar composed with some <div> and CSS to show the percent complete, but the numeric percent is stored in the hidden percent column.

Can I somehow make progress sortable, but actually sort by percent?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: August 14, 2015, 04:33:43 PM »

You can not do that, but you can custom your column 'sorter' function. The simple way to solve your issue is to sort your 'percent' field and define the 'formatter' function to display the progressbar, just like this example
http://www.jeasyui.com/demo/main/index.php?plugin=TreeGrid&theme=default&dir=ltr&pitem=TreeGrid%20Actions
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!