EasyUI Forum
September 14, 2025, 07:34:15 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datagrid Sort  (Read 6450 times)
TampaBay55
Newbie
*
Posts: 7


View Profile Email
« on: February 28, 2015, 08:14:56 AM »

Greetings:

How do I retrieve the current sort order for a datagrid?  If I wish to insert a record into the grid then I will need to know WHERE to insert it based on the sort order.  Thank you.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: March 01, 2015, 07:59:55 AM »

Call 'options' method to get the datagrid's options, in which you can retrieve current sort name and sort order.
Code:
var opts = $('#dg').datagrid('options');
var name = opts.sortName;
var order = opts.sortOrder;
console.log(name+"|"+order);
Logged
TampaBay55
Newbie
*
Posts: 7


View Profile Email
« Reply #2 on: March 01, 2015, 02:37:07 PM »

Thank you kindly.
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!