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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

edit dialog

Thread ID:

Created:

Updated:

Platform:

Replies:

130530 May 17,2017 08:14 AM UTC May 18,2017 04:03 PM UTC ASP.NET MVC 1
loading
Tags: Grid
Grant Stephen
Asked On May 17, 2017 08:14 AM UTC

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

Thavasianand Sankaranarayanan [Syncfusion]
Replied On 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. 


CONFIRMATION

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.

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

;