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
190
Row edit modal dialog not showing context data
posted

Trying to figure out why when I double click on the row the modal dialog displays empty data fields.

   <script type="text/javascript">
            $("#grid1").live("iggridupdatingdatadirty"function (event, ui) {
                $("#grid1").igGrid("saveChanges");
                return false;
            });
        </script>
 

 
        <h2>Grid</h2>
        <p>
            @Html.ActionLink("Create New""Create")
        </p>
        @( Html.Infragistics().Grid(Model).ID("grid1")
               .PrimaryKey("TypeID")
               .AutoGenerateColumns(false)
               .AutoGenerateLayouts(false)
               .Virtualization(false)
               .LocalSchemaTransform(true)
               .RenderCheckboxes(true)
               .Columns(column =>
                   {
 
                       column.For(x => x.TypeID).DataType("string").HeaderText("ID");
                       column.For(x => x.TypeDescription).DataType("string").HeaderText("Description");
                       column.For(x => x.AddedBy).DataType("string").HeaderText("Added By");
                       column.For(x => x.DateAdded).DataType("date").HeaderText("Date Added");
                       column.For(x => x.ModifiedBy).DataType("string").HeaderText("Modified By");
                       column.For(x => x.DateModified).DataType("date").HeaderText("Date Modified");
                       column.For(x => x.DisplayOrder).DataType("string").HeaderText("Order number");
                       column.For(x => x.Enabled).DataType("string").HeaderText("Enabled");
                   
                   })
               .Features(features =>
                   {
                       features.Sorting().Type(OpType.Local);
                       features.Paging().PageSize(30).Type(OpType.Local);
                       features.Selection().Mode(SelectionMode.Row);
                       features.Updating().EnableAddRow(true).EnableDeleteRow(true)
                               .EditMode(GridEditMode.RowEditTemplate)
                               .RowEditDialogContainment("owner")
                               .RowEditDialogWidth("300px")
                               .RowEditDialogHeight("200px")
                               .RowEditDialogOkCancelButtonWidth("100px")
                               .RowEditDialogFieldWidth("150px")
                               .ShowReadonlyEditors(true)
                               .RowEditDialogRowTemplateID("rowEditDialogRowTemplate")
                               .ColumnSettings(settings =>
                                   {
                                       settings.ColumnSetting().ColumnKey("TypeID").ReadOnly(true);
                                       settings.ColumnSetting().ColumnKey("AddedBy").ReadOnly(true);
                                       settings.ColumnSetting().ColumnKey("DateAdded").ReadOnly(true);
                                       settings.ColumnSetting().ColumnKey("ModifiedBy").ReadOnly(true);
                                       settings.ColumnSetting().ColumnKey("DateModified").ReadOnly(true);
 
                                       settings.ColumnSetting().ColumnKey("TypeDescription").EditorType(ColumnEditorType.Text).TextEditorOptions(options => options.ValidatorOptions(option =>
                                           {
                                               option.KeepFocus(ValidatorKeepFocus.Never);
                                               option.BodyAsParent(false);
                                               option.Required(true);
                                           }));
                                       settings.ColumnSetting().ColumnKey("Enabled").EditorType(ColumnEditorType.Text).TextEditorOptions(options => options.ValidatorOptions(option =>
                                           {
                                               option.KeepFocus(ValidatorKeepFocus.Never);
                                               option.BodyAsParent(false);
                                               option.Required(true);
                                           }));
                                   });
                   })
               .DataBind()
               .Height("500px")
               .Width("100%")
               .Render())