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

With grid "Dialog" edit mode loses input focus

Greetings. I have the following grid, very simple:

@(Html.EJ().Grid<object>("Grid")
        .Datasource(ds => ds.Json((IEnumerable<object>)ViewBag.dataSource)
            .UpdateURL("AnagraficaFamiglieComponenti/PerformUpdate")
            .InsertURL("AnagraficaFamiglieComponenti/PerformInsert")
            .RemoveURL("AnagraficaFamiglieComponenti/PerformDelete")
            .Adaptor(AdaptorType.RemoteSaveAdaptor))
        .Locale("it-IT")
        .AllowTextWrap()
    .EditSettings(edit => edit.AllowEditing().AllowAdding().EditMode(EditMode.Dialog))
    .ToolbarSettings(tools => tools.ShowToolbar().ToolbarItems(items =>
    {
        items.AddTool(ToolBarItems.Add);
        items.AddTool(ToolBarItems.Edit);
        items.AddTool(ToolBarItems.Update);
        items.AddTool(ToolBarItems.Cancel);
    }))
    .Columns(col =>
    {
        //LA PRIMARY KEY VA SEMPRE DEFINITA, EVENTUALMENTE NASCOSTA, SENNO' LE OPERAZIONI CRUD NON FUNZIONANO
        col.Field("Id").HeaderText("Id").IsPrimaryKey(true).Visible(false).Add();
        col.Field("Nome").HeaderText("Nome")
                         .ValidationRules(v => v.AddRule("required", true))
                         .ValidationRules(v => v.AddRule("rangelength", "[3,50]")).Add();
        col.Field("Abilitato").HeaderText("Abilitato").DefaultValue(true).EditType(EditingType.Boolean).Add();
    })
)

The problem I'm facing is the following: when the user tries to add/edit items, the overlay window opens (since the edit mode is of type "Dialog") and the first input field, correctly, has proper keyboard focus. After about 0.5 seconds, the focus is lost; so the user has to manually click on the first input field. I want to underline that this isn't happening only with this grid, but with every grid in my project which makes use of embedded add/edit through Editmode.Dialog. I just pasted here the simplest grid where this problem is occurring. Thanks in advance for the kind help.

1 Reply

SR Sellappandi Ramu Syncfusion Team January 13, 2016 09:41 AM UTC

Hi Carlo, 

 

We considered this requirement “Input element is focus out in dialog edit box” as improvement feature and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 

 

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents 

 

Regards, 
Sellappandi R


Loader.
Live Chat Icon For mobile
Up arrow icon