protected virtual GridData InitializeChecklistExecutionAssetsGridData(HtmlHelper html, ViewContext viewContext)
        {
            var toolbarOptions = new GridToolBarOptions(false);

            var commandOptions = new GridCommandButtonOptions(true, displayAddButtonInGridHeader: false, displayDeleteButton: false);

            var gridData = new GridData(GridConstants.rigChecklistBAAssetsGrid, BaseController, "DisplayAssets", initializeCallBack: true, callBackRoute: new { Controller = BaseController, Action = "DisplayAssets" }, toolbarOptions: toolbarOptions, commandButtonOptions: commandOptions, showPager: false)
            {
                Title = ""
            };

            var assetValueCombo = new GridCombo("assetvalue", GetYesNoNaValues(), "Id", "DisplayValue", "Id");

            var displayColumns = new List <GridDisplayColumn>
            {
                new GridDisplayColumn("GroupName", displayName: "Group", order: 30, width: 10, columnType: MVCxGridViewColumnType.TextBox, isReadOnly: true, allowEditLayout: DefaultBoolean.False, allowSort: DefaultBoolean.False, allowHeaderFilter: DefaultBoolean.False),
                new GridDisplayColumn("SystemName", displayName: "System", order: 40, width: 70, columnType: MVCxGridViewColumnType.TextBox, isReadOnly: true, allowEditLayout: DefaultBoolean.False, allowSort: DefaultBoolean.False, allowHeaderFilter: DefaultBoolean.False),
                new GridDisplayColumn("SubSystemName", displayName: "SubSystem", order: 40, width: 70, columnType: MVCxGridViewColumnType.TextBox, isReadOnly: true, allowEditLayout: DefaultBoolean.False, allowSort: DefaultBoolean.False, allowHeaderFilter: DefaultBoolean.False),
                new GridDisplayColumn("SubSystemName", displayName: "SubSystem", order: 40, width: 70, columnType: MVCxGridViewColumnType.TextBox, isReadOnly: true, allowEditLayout: DefaultBoolean.False, allowSort: DefaultBoolean.False, allowHeaderFilter: DefaultBoolean.False),
                new GridDisplayColumn("AssetValue", displayName: "Value", order: 40, width: 70, columnType: MVCxGridViewColumnType.ComboBox, allowSort: DefaultBoolean.False, allowHeaderFilter: DefaultBoolean.False, lookup: assetValueCombo),

                new GridDisplayColumn("ChecklistGroupId", order: 200, width: 0, displayName: "Checklist Group Id", isVisible: false),
                new GridDisplayColumn("AssetGroupId", order: 200, width: 0, displayName: "Asset Group Id", isVisible: false),
                new GridDisplayColumn("SystemId", order: 200, width: 0, displayName: "System Id", isVisible: false),
                new GridDisplayColumn("SubSystemId", order: 200, width: 0, displayName: "Sub System Id", isVisible: false),
                new GridDisplayColumn("Id", order: 200, width: 0, displayName: "Rig Group Asset Id", isVisible: false),
            };

            gridData.DisplayColumns = displayColumns;


            gridData.Routes.Add(new GridRoute(GridRouteTypes.Update, new { Controller = BaseController, Action = "UpdateAsset" }));

            gridData.LayoutColumns = new List <GridEditLayoutColumn>()
            {
                new GridEditLayoutColumn("AssetValue", displayName: "Asset"),
                new GridEditLayoutColumn("ChecklistGroupId", displayName: "Checklist Group Id"),
                new GridEditLayoutColumn("Id", displayName: "Rig Group Asset Id")
            };

            gridData.FormLayout = new GridEditFormLayout(
                gridData.LayoutColumns
                , editMode: GridViewEditingMode.EditFormAndDisplayRow
                , processLayout: i =>
            {
                i.HorizontalAlign = FormLayoutHorizontalAlign.Right;
                i.Width           = Unit.Percentage(100);
            }
                );

            return(gridData);
        }
        private GridData InitializeChecklistExecutionThirdPartyJobActivitiesGridData(HtmlHelper html, ViewContext viewContext)
        {
            var toolbarOptions = new GridToolBarOptions(false);

            var commandOptions = new GridCommandButtonOptions(true, displayAddButtonInGridHeader: false, displayDeleteButton: false);

            var gridData = new GridData(GridConstants.rigChecklistBAAssetsGrid, BaseController, "DisplayThirdPartyJobs", key: "Id", initializeCallBack: true, callBackRoute: new { Controller = BaseController, Action = "DisplayThirdPartyJobs" }, toolbarOptions: toolbarOptions, commandButtonOptions: commandOptions, showPager: false)
            {
                Title = ""
            };


            var displayColumns = new List <GridDisplayColumn>
            {
                new GridDisplayColumn("JobId", displayName: "Job", order: 30, width: 10, columnType: MVCxGridViewColumnType.TextBox, isReadOnly: true, allowEditLayout: DefaultBoolean.True, allowSort: DefaultBoolean.False, allowHeaderFilter: DefaultBoolean.False),
                new GridDisplayColumn("ThirdPartyCount", displayName: "Third Party Count", order: 40, width: 70, columnType: MVCxGridViewColumnType.SpinEdit, allowEditLayout: DefaultBoolean.True, allowSort: DefaultBoolean.False, allowHeaderFilter: DefaultBoolean.False),

                new GridDisplayColumn("Id", order: 200, width: 0, displayName: "Rig Work Instruction Id", isVisible: false)
            };

            gridData.DisplayColumns = displayColumns;

            gridData.Routes.Add(new GridRoute(GridRouteTypes.Update, new { Controller = BaseController, Action = "UpdateThirdPartyJob" }));

            gridData.LayoutColumns = new List <GridEditLayoutColumn>()
            {
                new GridEditLayoutColumn("ThirdPartyCount", displayName: "Third Party Count"),
                new GridEditLayoutColumn("JobId", displayName: "Job"),
                new GridEditLayoutColumn("Id", displayName: "Rig Third Party Job Id")
            };

            gridData.FormLayout = new GridEditFormLayout(
                gridData.LayoutColumns
                , editMode: GridViewEditingMode.EditFormAndDisplayRow
                , processLayout: i =>
            {
                i.HorizontalAlign = FormLayoutHorizontalAlign.Right;
                i.Width           = Unit.Percentage(100);
            }
                );

            return(gridData);
        }