Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
GridStartEditTriggers.DblClick doesn't work ???
posted

Hi,

I am setting this in C# in an MVC3 View.

The grid however refuses to accept it. no error but the grid always starts editing after 1 click.

Regards

Graham

 

@(Html.Infragistics().Grid<CRUD1.Models.Site>()

    .ID("SiteGrid")

    .AutoGenerateColumns(false)

    .PrimaryKey("Id")

    .Columns(column =>

    {

        column.For(x => x.Id).DataType("number").HeaderText("Id");

        column.For(x => x.SBII_SiteId).DataType("number").HeaderText("Site Id");

        column.For(x => x.SiteName).DataType("string").HeaderText("Site Name");

        column.For(x => x.Client_SiteId).DataType("string").HeaderText("Client Site Id");

        column.For(x => x.Address1).DataType("string").HeaderText("Address 1");

        column.For(x => x.Address2).DataType("string").HeaderText("Address 2");

        column.For(x => x.Address3).DataType("string").HeaderText("Address 3");

        column.For(x => x.PostCode).DataType("string").HeaderText("PostCode");

        column.For(x => x.Phone).DataType("string").HeaderText("Phone");

        column.For(x => x.EARegistration).DataType("string").HeaderText("EAReg");

        column.For(x => x.IpAddress).DataType("string").HeaderText("Site Ip");

        column.For(x => x.SBII_IpAddress).DataType("string").HeaderText("Controller Ip");

        column.For(x => x.Enabled).DataType("bool").HeaderText("Enabled");

    })

    .Features(feature =>

    {

        feature.Updating().EditMode(GridEditMode.Row).StartEditTriggers(GridStartEditTriggers.DblClick);

        feature.Updating().ColumnSettings(settings =>

        {

            settings.ColumnSetting().ColumnKey("Id").ReadOnly(true);

            settings.ColumnSetting().ColumnKey("SiteId").EditorType(ColumnEditorType.Numeric).Required(true).Validation(false);

            settings.ColumnSetting().ColumnKey("SiteName").EditorType(ColumnEditorType.Text).Required(true).Validation(true);

            settings.ColumnSetting().ColumnKey("Address1").EditorType(ColumnEditorType.Text).Required(false).Validation(true);

            settings.ColumnSetting().ColumnKey("Address2").EditorType(ColumnEditorType.Text).Required(false).Validation(true);

            settings.ColumnSetting().ColumnKey("Address3").EditorType(ColumnEditorType.Text).Required(false).Validation(true);

            settings.ColumnSetting().ColumnKey("PostCode").EditorType(ColumnEditorType.Text).Required(false).Validation(true);

            settings.ColumnSetting().ColumnKey("Phone").EditorType(ColumnEditorType.Text).Required(false).Validation(true);

            settings.ColumnSetting().ColumnKey("EARegistration").EditorType(ColumnEditorType.Text).Required(false).Validation(true);

            settings.ColumnSetting().ColumnKey("Client_SiteId").EditorType(ColumnEditorType.Text).Required(false).Validation(false);

            settings.ColumnSetting().ColumnKey("IpAddress").EditorType(ColumnEditorType.Text).Required(false).Validation(false);

            settings.ColumnSetting().ColumnKey("SBII_IpAddress").EditorType(ColumnEditorType.Text).Required(false).Validation(false);

            settings.ColumnSetting().ColumnKey("Enabled").ReadOnly(true);

        });

    })

 

    .DataSourceUrl(Url.Action("Details", "Site"))

    .UpdateUrl(Url.Action("Update", "Site"))

 

    //MUST remember to do these !!

    .DataBind()

    .Render()

)

Parents
  • 24497
    posted

    Hi Graham,

    I tested features.Updating().StartEditTriggers(GridStartEditTriggers.DblClick)... and it worked correctly. I also tested online sample (please try to test it too)
    http://samples.infragistics.com/jquery/grid/row-editing-api'

    which has setter for DblClick and that also worked as expected.
    That is possible that in your application those settings for some reason do not have effect or they are overriden by some other logic.

    Please run your sample, open source of generated html (in browser) and try to find string "startEditTriggers:". That should be located somewhere within igGrid({ ....... }); block and it should appear as
    startEditTriggers: 'DblClick'

     

Reply Children