How Change color icon e-edit e-add e-delete

I'd like to change the color of the default icons which are black


 <GridColumn HeaderText="" TextAlign="TextAlign.Left" Width="12">
                                    <Template>
                                        @{
                                            var record = (context as Category);
                                            <EjsButton Content="@ContentEditButton" HtmlAttributes="@editButton" iconCss="e-icons e-edit" cssClass="e-success" OnClick="@(()=>UpdateCategory(record))"></EjsButton>
                                        }
                                    </Template>
                                </GridColumn>

public string ContentEditButton = "";
private Dictionary<string, object> editButton = new Dictionary<string, object>()
{
        { "title", "Modifica"}
    };



3 Replies

RS Renjith Singh Rajendran Syncfusion Team February 24, 2020 10:55 AM UTC

Hi Walter, 

Thanks for contacting Syncfusion support. 

We suggest you to apply style for the corresponding class elements to achieve this requirement. Please use the code below, 

 
<style> 
    .e-grid .e-icons.e-edit{ 
        color:red; 
    } 
</style> 
 
<EjsGrid @ref="Grid" DataSource="@Orders" AllowFiltering="true" AllowPaging="true"> 
    <GridColumns> 
       <GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="150"> 
                <Template> 
                    @{ 
                        var record = (context as Order); 
                        <EjsButton Content="@ContentEditButton" HtmlAttributes="@editButton" IconCss="e-icons e-edit" CssClass="e-success"></EjsButton> 
                    } 
                </Template> 
        </GridColumn> 
        ... 
   </GridColumns> 
</EjsGrid> 


Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 



WA Walter February 24, 2020 11:07 AM UTC

Thanks a lot !!
Walter


RS Renjith Singh Rajendran Syncfusion Team February 25, 2020 05:00 AM UTC

Hi Walter, 

Thanks for your update. 

We are glad to hear that the provided suggestion helped you in achieving your requirement. 

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


Loader.
Up arrow icon