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

edit dialog

can i set the width of edit dialog witout overridding css?
]G

1 Reply

TS Thavasianand Sankaranarayanan Syncfusion Team May 18, 2017 04:03 PM UTC

Hi Grant, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we suspect that you want to set width for the edit mode dialog. So, we suggest you to set the width of the dialog in actionComplete event of ejGrid control. 

Refer the below code example. 


@(Html.EJ().Grid<object>("FlatGrid") 
        .Datasource((IEnumerable<object>)ViewBag.datasource) 
         
        .AllowPaging()    /*Paging Enabled*/ 
        .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Dialog); }) 
         
        .ToolbarSettings(toolbar => 
        { 
            toolbar.ShowToolbar().ToolbarItems(items => 
            { 
                items.AddTool(ToolBarItems.Add); 
                items.AddTool(ToolBarItems.Edit); 
                items.AddTool(ToolBarItems.Delete); 
                items.AddTool(ToolBarItems.Update); 
                items.AddTool(ToolBarItems.Cancel); 
            }); 
        }) 
        .ClientSideEvents(clientevent => clientevent.ActionComplete("complete")) 
        .Columns(col => 
        { 
            ----------- 
 
        }) 
     
        ) 

----------------- 
function complete(args) { 
             
            if ((args.requestType == "beginedit" || args.requestType == "add") && args.model.editSettings.editMode == "dialog") { 
                 
                $("#" + this._id + "_dialogEdit").ejDialog({ width: 500}); // set the width for edit mode dialog  
            } 
} 


We have prepared a sample and it can be downloadable from the below location. 


Refer the help documentation. 




Regards, 
Thavasianand S. 


Loader.
Up arrow icon