EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: arma on November 09, 2015, 04:08:43 PM



Title: Show icon before text in grid column
Post by: arma on November 09, 2015, 04:08:43 PM
Hi,

How to reuse existing jeasui css icon class to show icon before text.

In grid column formatter if meet condition then i would like to return for example "[icon] some text".

Thanks


Title: Re: Show icon before text in grid column
Post by: stworthy on November 10, 2015, 12:46:48 AM
Please refer to this 'formatter' function.
Code:
function formatF(value,row){
return '<span class="icon-save" style="display:inline-block;width:16px;height:16px;vertical-align:middle"></span>'+value;
}


Title: Re: Show icon before text in grid column
Post by: arma on November 11, 2015, 02:01:09 PM
Nice, thanks a lot stworthy :D