EasyUI Forum
May 07, 2024, 12:56:55 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: Grid Column Attributes  (Read 7112 times)
arma
Full Member
***
Posts: 110


View Profile
« on: October 23, 2013, 06:03:01 PM »

Hi,

Is there a way to add some attribute to datagrid column that can be accessed with getColumnOption ? I need some attributes to put in columns for checking some condition. For example i need attribute column type (number, date, string etc) or attribute 'ignore' (flag) for using on search filter etc.

Something like :

Code:
<th field="my_column_field" width="100" sortable='true' data-options="type:number,ignore_search:true,hilight:false">

Thanks.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 24, 2013, 06:02:11 PM »

Any properties defined in 'data-options' can be accessed by using 'getColumnOption' method.
Code:
var col = $('#dg').datagrid('getColumnOption', 'my_column_field');
console.log(col.type);
console.log(col.ignore_search);
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!