Title: Does formatter:function cancel out styler:function? Post by: swells808 on October 07, 2014, 03:21:30 PM I have one column of my data grid that needs to do 2 different things
1. I need to subtract the entries from 2 different columns to return the result to this column (col a - col b = col c) 2. I need to set conditional styling for this column so if the result is >10 its turns yellow but if its >5 it turns red. So here is the code I added to my grid, the problem I am having is the math result comes through correctly but the cell styler is ignored entirely (prior to the math function the styler would ignore the else statement). It seems like I can only call for one function to be completed which can't be right can it? Here is my code: Code: <table id="dg" title="Maintenance Log" class="easyui-datagrid" style="width:1000px;height:650px" Title: Re: Does formatter:function cancel out styler:function? Post by: stworthy on October 07, 2014, 06:40:54 PM Please try the code below to define the 'time' column.
Code: <th data-options="field:'time',width:50, Title: Re: Does formatter:function cancel out styler:function? Post by: swells808 on October 07, 2014, 07:06:01 PM Close!
The math function works and the first if statement works but it ignores the "else if" part of the code. What is missing? Title: Re: Does formatter:function cancel out styler:function? Post by: chrwei on October 13, 2014, 01:10:30 PM shouldn't
Code: styler:function cellStyler(value,row,index){ be Code: styler:function(value,row,index){ ? |