EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: dacracot on August 14, 2015, 10:49:31 AM



Title: Sorting by a hidden column.
Post by: dacracot 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?


Title: Re: Sorting by a hidden column.
Post by: jarry 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