We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom CSS on Edit Dialog

Thread ID:





146072 Jul 18,2019 03:45 PM UTC Jul 22,2019 07:26 AM UTC ASP.NET MVC - EJ 2 3
Tags: Grid
Taylor Tillman
Asked On July 18, 2019 03:45 PM UTC

I have a simple edit dialog containing a dropdown menu and the Save and Cancel buttons. I am trying to change the color of the Save button to match the website's theme and also the blue shadow around the dropdown menu when it has focus. Following the documentation to customize the edit dialog I am able to change the header text and dialog height in the ActionComplete method like in the example but I haven't been able to find any documentation of other dialog elements. Which elements do I need to target to style the buttons and dropdown menu?

Thavasianand Sankaranarayanan [Syncfusion]
Replied On July 19, 2019 01:24 PM UTC

Hi Taylor, 

Thanks for contacting Syncfusion support. 

We have validated your requirement. You can customize the buttons and dropDownList using the below way. 
Please find the below code snippet for more information. 

@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.datasource).ActionComplete("actionComplete").AllowPaging(true).Columns(col => 
    col.Field("OrderID").HeaderText("Order ID").EditType("dropdownedit").IsPrimaryKey(true).Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); 
}).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog); }).Toolbar(new List<string>() { "Add", "Edit", "Delete", "Update", "cancel"}).Render() 
    function actionComplete(args) { 
        if (args.requestType === 'add' || args.requestType === 'beginEdit') { 
            var buttons = args.dialog.element.getElementsByTagName('button'); 
            buttons[1].style.color = 'Black'; 
            buttons[1].style.backgroundColor = 'White'; 
    .e-gridform .e-rowcell .e-float-input.e-input-focus 
        border-color: #b54545 !important; 
   .e-dropdownbase .e-list-item.e-active,.e-gridform .e-dropdownbase .e-list-item.e-active.e-hover { 
        background-color: #b54545 !important; 

Please get back to us, if you need further assistance. 

Thavasianand S. 

Taylor Tillman
Replied On July 19, 2019 04:50 PM UTC

Hi Thavasianand,

That worked for me. Thanks.


Thavasianand Sankaranarayanan [Syncfusion]
Replied On July 22, 2019 07:26 AM UTC

Hi Taylor, 
Thanks for your update. 
We are happy that the problem has been resolved at your end. 
Thavasianand S.  


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon