Title: how to get the field name inside an styler function? Post by: yulei on February 12, 2019, 08:01:41 AM this post :https://www.jeasyui.com/forum/index.php?topic=4940.msg12207#msg12207 (https://www.jeasyui.com/forum/index.php?topic=4940.msg12207#msg12207)
is become invalid。 when i console.log(this) in the styler function ,i print the table . in the old versions , datagrid call styler directly , now it use styler.call('datagridTarget',...). can styler add a field param after (value,row,index,...)? Title: Re: how to get the field name inside an styler function? Post by: stworthy on February 12, 2019, 06:16:42 PM Define a function that accepts the 'field' parameter and return the 'styler' function.
Code: function mystyler(field){ And then apply it to the column. Code: <th data-options="field:'productid',width:100, |