Grid toolbar with fontawesome

Hi in my grid i would like to use the fontawesome icons.

My toolbar definition is the following:


    List<object> toolbarItems = new List<object>();
    toolbarItems.Add(new { text = "Click", tooltipText = "Click", prefixIcon = "far fa-plus-square", id = "Click" });



Im my grid the toolbar is defined as following but the icon was not showed:


<ejs-grid id="ContractsGrid" allowPaging="true" locale="it" commandClick="commandClick"
rowDataBound="rowDataBound" dataBound="dataBound"
toolbar=toolbarItems>


How can achieve that?


Thanks

Stefano





1 Reply

SK Sujith Kumar Rajkumar Syncfusion Team November 15, 2021 10:13 AM UTC

Hi Stefano, 
 
Greetings from Syncfusion support. 
 
We checked the reported problem and suspect that it is occurring because the icon class was not provided properly(“far” instead of “fa”). On setting the font awesome icon class as – “fa fa-plus-square”, the icon was properly displayed as shown in the below image, 
 
 
 
Please check the below sample prepared based on this for reference, 
 
 
So please provide the proper icon class to resolve the problem. 
 
Let us know if you have any concerns. 
 
Regards, 
Sujith R 


Loader.
Up arrow icon