public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { InitializeGridData(GridData, "UpdateChecklistHelp"); //Generic configurations settings.Configure(GridData, html, viewContext); settings.SettingsDetail.ShowDetailRow = false; settings.CommandColumn.Width = Unit.Percentage(2); int oapChecklistCommentId = (int)(ViewData[CurrentChecklistId] ?? 0); string oapChecklistCommentName = (string)(ViewData[CurrentChecklistName] ?? string.Empty); //Select the Current Row when it defined. if (oapChecklistCommentId != 0) { settings.Columns.Grid.Selection.SelectRowByKey(oapChecklistCommentId); } var columnHelp = settings.Columns["Help"] as MVCxGridViewColumn; if (columnHelp != null) { columnHelp.EditorProperties().Memo(m => { m.Width = Unit.Percentage(100); m.Rows = 10; }); } }
public void ConfigureRegulatoryAuditComplianceMissingProtocols(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { var gridData = InitializeRegulatoryAuditComplianceMissingProtocolsGridData(html); settings.Configure(gridData, html, viewContext); settings.CommandColumn.Visible = false; }
public void ConfigureProtocols(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { var gridData = InitializeProtocolsGridData(html); settings.Configure(gridData, html, viewContext); settings.CommandColumn.Visible = false; }
public void ConfigureProtocolScoring(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { InitializeProtocolScoringGridData(GridData, "UpdateNoValue"); settings.KeyFieldName = GridData.Key; settings.Name = $"{GridData.Name}"; settings.Configure(GridData, html, viewContext); settings.CommandButtonInitialize = (sender, e) => { string fieldValue = (sender as MVCxGridView).GetRowValues(e.VisibleIndex, "EditNoValue").ToString(); if (e.ButtonType == ColumnCommandButtonType.Edit) { if (fieldValue.ToLower() == "false") { e.Visible = false; } } }; settings.Settings.ShowGroupPanel = true; settings.Settings.ShowFooter = true; settings.TotalSummary.Add(DevExpress.Data.SummaryItemType.Sum, "YesValue").DisplayFormat = "n0"; settings.TotalSummary.Add(DevExpress.Data.SummaryItemType.Sum, "NoValue").DisplayFormat = "n0"; settings.TotalSummary.Add(DevExpress.Data.SummaryItemType.Sum, "MaxScore").DisplayFormat = "n0"; settings.TotalSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Score").DisplayFormat = "n0"; settings.TotalSummary.Add(DevExpress.Data.SummaryItemType.Average, "AverageScore").DisplayFormat = "n2"; settings.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "YesValue").DisplayFormat = "YesValue: {0:n0}"; settings.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "NoValue").DisplayFormat = "NoValue: {0:n0}"; settings.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "MaxScore").DisplayFormat = "MaxScore: {0:n0}"; settings.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Score").DisplayFormat = "Score: {0:n0}"; settings.GroupSummary.Add(DevExpress.Data.SummaryItemType.Average, "AverageScore").DisplayFormat = "AverageScore: {0:n2}"; }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { InitializeGridData(html, viewContext, AuditGridData, "CreateAudit", "UpdateAudits", "DeleteAudits"); // Popup form customization settings.SettingsPopup.EditForm.Modal = true; settings.SettingsPopup.EditForm.HorizontalAlign = PopupHorizontalAlign.Center; settings.SettingsPopup.EditForm.VerticalAlign = PopupVerticalAlign.WindowCenter; settings.SettingsPopup.EditForm.CloseOnEscape = AutoBoolean.True; settings.SettingsText.PopupEditFormCaption = "Add " + AuditName; //Master Grid Specific configurations settings.KeyFieldName = AuditGridData.Key; settings.Name = $"{AuditGridData.Name}"; settings.SettingsDetail.ShowDetailRow = false; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; settings.ClientSideEvents.BeginCallback = "function(s,e) {OnBeginCallback(s,e);}"; settings.ClientSideEvents.EndCallback = "function(s,e) {OnEndCallback(s,e);}"; //settings.ClientSideEvents.ToolbarItemClick = "function(s,e){e.processOnServer = false;}"; //Generic configurations AuditGridData.Title = Translate(AuditGridData.Title); settings.Styles.AlternatingRow.BackColor = System.Drawing.Color.Red; settings.Configure(AuditGridData, html, viewContext); var column = settings.Columns["Description"] as MVCxGridViewColumn; if (column != null) { column.EditorProperties().Memo(m => { m.Width = Unit.Percentage(100); m.Rows = 5; }); } settings.SettingsExport.BeforeExport = (sender, e) => { MVCxGridView gridView = sender as MVCxGridView; if (sender == null) { return; } gridView.Columns["OwnerId"].Visible = false; }; settings.CellEditorInitialize = (s, e) => { e.Editor.ReadOnly = false; }; settings.CommandColumn.Visible = false; SelectRow((int)(ViewData[AuditId] ?? 0), (string)(ViewData[AuditName] ?? string.Empty), ref settings); }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { settings.CommandColumn.Width = Unit.Percentage(2); InitializeGridData(GridData, "CreateChecklistEquipment", "UpdateChecklistEquipment", "DeleteChecklistEquipment"); //Generic configurations settings.Configure(GridData, html, viewContext); settings.SettingsDetail.ShowDetailRow = false; }
public virtual void ConfigureAssets(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { var gridData = InitializeChecklistExecutionAssetsGridData(html, viewContext); settings.Configure(gridData, html, viewContext); settings.CommandButtonInitialize = (o, e) => { if ((e.ButtonType == ColumnCommandButtonType.Delete)) { e.Visible = false; } }; }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { InitializeRigChecklistGridData(html, viewContext, GridDataChecklist, "CreateRigChecklist", "UpdateRigChecklist", "DeleteRigChecklist"); // Popup form customization settings.SettingsPopup.EditForm.Modal = true; settings.SettingsPopup.EditForm.HorizontalAlign = PopupHorizontalAlign.Center; settings.SettingsPopup.EditForm.VerticalAlign = PopupVerticalAlign.WindowCenter; settings.SettingsPopup.EditForm.CloseOnEscape = AutoBoolean.True; settings.SettingsText.PopupEditFormCaption = "Add " + RigChecklistName; //Master Grid Specific configurations settings.KeyFieldName = GridDataChecklist.Key; settings.Name = $"{GridDataChecklist.Name}"; settings.SettingsDetail.ShowDetailRow = false; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; //Generic configurations GridDataChecklist.Title = Translate(GridDataChecklist.Title); settings.Configure(GridDataChecklist, html, viewContext); var column = settings.Columns["Description"] as MVCxGridViewColumn; if (column != null) { column.EditorProperties().Memo(m => { m.Width = Unit.Percentage(100); m.Rows = 5; }); } settings.SettingsExport.BeforeExport = (sender, e) => { MVCxGridView gridView = sender as MVCxGridView; if (sender == null) { return; } gridView.Columns["OwnerId"].Visible = false; }; settings.CellEditorInitialize = (s, e) => { e.Editor.ReadOnly = false; }; settings.CommandColumn.Visible = false; SelectRow((int)(ViewData[RigChecklistId] ?? 0), (string)(ViewData[RigChecklistName] ?? string.Empty), ref settings); }
public virtual void ConfigurePreviousFindings(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { var gridData = InitializePreviousFindingsGridData(html); settings.Configure(gridData, html, viewContext); settings.CommandButtonInitialize = (o, e) => { if ((e.ButtonType == ColumnCommandButtonType.Update) || (e.ButtonType == ColumnCommandButtonType.Cancel)) { e.Visible = false; } }; }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { settings.CommandColumn.Width = Unit.Percentage(2); InitializeGridData(GridData, "CreateQuestionTag", "UpdateQuestionTag", "DeleteQuestionTag"); //Master Grid Specific configurations settings.KeyFieldName = GridData.Key; settings.Name = $"{GridData.Name}"; settings.SettingsDetail.ShowDetailRow = false; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; //Generic configurations settings.Configure(GridData, html, viewContext); SelectRow((int)(ViewData[CurrentQuestionTagId] ?? 0), (string)(ViewData[CurrentQuestionTagId] ?? string.Empty), ref settings); }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { settings.CommandColumn.Width = Unit.Percentage(2); InitializeGridData(GridData, "CreateChecklistWorkInstruction", "UpdateChecklistWorkInstruction", "DeleteChecklistWorkInstruction"); //Master Grid Specific configurations settings.KeyFieldName = GridData.Key; settings.Name = $"{GridData.Name}"; settings.SettingsDetail.ShowDetailRow = false; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; //Generic configurations settings.Configure(GridData, html, viewContext); }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { InitializeRigChecklistGridData(html, viewContext, GridDataChecklist, "CreateProtocol", "UpdateProtocol", "DeleteProtocol"); //Master Grid Specific configurations settings.KeyFieldName = GridDataChecklist.Key; settings.Name = $"{GridDataChecklist.Name}"; settings.SettingsDetail.ShowDetailRow = false; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; if (!(bool)Session["isAuditIdClick"]) { GridDataChecklist.CallBackRoute = new { Area = "cOap", Controller = "OapProtocolsToAudit", Action = "DisplayProtocols", aId = ViewData["SelectedAuditId"] } } ; if ((bool)Session["isAuditIdClick"]) { settings.ClientSideEvents.EndCallback = "function (s,e){ refreshProtocolAssessorGrid(s,e);}"; } //Generic configurations GridDataChecklist.Title = Translate(GridDataChecklist.Title); settings.Configure(GridDataChecklist, html, viewContext); settings.CommandColumn.Visible = false; // Popup form customization settings.SettingsPopup.EditForm.Modal = true; settings.SettingsPopup.EditForm.HorizontalAlign = PopupHorizontalAlign.Center; settings.SettingsPopup.EditForm.VerticalAlign = PopupVerticalAlign.WindowCenter; settings.SettingsPopup.EditForm.CloseOnEscape = AutoBoolean.True; settings.SettingsText.PopupEditFormCaption = "Add Protocols To Audit"; settings.CellEditorInitialize = (s, e) => { e.Editor.ReadOnly = false; }; settings.SettingsExport.BeforeExport = (sender, e) => { MVCxGridView gridView = sender as MVCxGridView; if (sender == null) { return; } gridView.Columns["OwnerId"].Visible = false; }; }
public void ConfigureRelatedQuestionSubChild(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { int oapChecklistTopicId = (int)(ViewData[CurrentTopicId] ?? 0); string oapChecklistTopicName = (string)(ViewData[CurrentTopicName] ?? string.Empty); int oapChecklistQuestionId = (int)(ViewData[CurrentQuestionId] ?? 0); string oapChecklistQuestionName = (string)(ViewData[CurrentQuestionName] ?? string.Empty); SubChildRelatedQuestionGridData.ToolBarOptions.SearchName = $"{SubChildRelatedQuestionGridData.ToolBarOptions.SearchName}_{oapChecklistQuestionId}"; InitializeSubChildRelatedQuestionGridData(SubChildRelatedQuestionGridData, "CreateChecklistRelatedQuestionMap", "DeleteChecklistRelatedQuestionMap", oapChecklistQuestionId, oapChecklistQuestionName); //SubChildRelatedQuestionGridData.Name = $"{SubChildRelatedQuestionGridData.Name}_{oapChecklistQuestionName}_{oapChecklistQuestionId}"; //very sensitive to characters only use Unserscore. using anyother charaters other than alphabets could cause grid display issues. settings.SettingsDetail.MasterGridName = $"{ChildGridData.Name}_{oapChecklistTopicName}_{oapChecklistTopicId}"; // GridInformation.MasterGridName; settings.Configure(SubChildRelatedQuestionGridData, html, viewContext); settings.SettingsDetail.ShowDetailRow = false; }
public void ConfigureChild(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { settings.CommandColumn.Width = Unit.Percentage(2); int oapTypeInputId = (int)(ViewData[CurrentTypeId] ?? 0); string oapTypeInputName = (string)(ViewData[CurrentTypeName] ?? string.Empty); ChildGridData.ToolBarOptions.SearchName = $"{ChildGridData.ToolBarOptions.SearchName}_{oapTypeInputId}"; InitializeChildGridData(ChildGridData, "CreateChild", "UpdateChild", "DeleteChild", oapTypeInputId, oapTypeInputName); //very sensitive to characters only use Unserscore. using anyother charaters other than alphabets could cause grid display issues. ChildGridData.Name = $"{ChildGridData.Name}_{oapTypeInputName}_{oapTypeInputId}"; settings.SettingsDetail.MasterGridName = $"{GridData.Name}"; // GridInformation.MasterGridName; settings.Configure(ChildGridData, html, viewContext); }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { InitializeGridData(GridDataProtocolQuestionHeader, "CreateProtocolQuestionHeader", "UpdateProtocolQuestionHeader", "DeleteProtocolQuestionHeader"); //Master Grid Specific configurations settings.KeyFieldName = GridDataProtocolQuestionHeader.Key; settings.Name = $"{GridDataProtocolQuestionHeader.Name}"; settings.SettingsDetail.ShowDetailRow = false; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; settings.ClientSideEvents.BeginCallback = "OnBeginCallback"; settings.ClientSideEvents.EndCallback = "OnEndCallback"; //Generic configurations settings.Configure(GridDataProtocolQuestionHeader, html, viewContext); SelectRow((int)(ViewData[CurrentProtocolQuestionHeaderId] ?? 0), (string)(ViewData[CurrentProtocolQuestionHeaderName] ?? string.Empty), ref settings); }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { settings.CommandColumn.Width = Unit.Percentage(2); InitializeGridData(GridData, "CreateGraphic", "UpdateGraphic", "DeleteGraphic"); //Master Grid Specific configurations settings.KeyFieldName = GridData.Key; settings.Name = $"{GridData.Name}"; //Generic configurations settings.Configure(GridData, html, viewContext); SelectRow((int)(ViewData[CurrentGraphicId] ?? 0), (string)(ViewData[CurrentGraphicName] ?? string.Empty), ref settings); settings.CellEditorInitialize = (s, e) => { e.Editor.ReadOnly = false; }; }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { settings.CommandColumn.Width = Unit.Percentage(2); InitializeGridData(GridDataChecklist, "CreateChecklist", "UpdateChecklist", "DeleteChecklist"); //Master Grid Specific configurations settings.KeyFieldName = GridDataChecklist.Key; settings.Name = $"{GridDataChecklist.Name}"; settings.SettingsDetail.ShowDetailRow = false; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; settings.ClientSideEvents.BeginCallback = "OnBeginCallback"; //settings.ClientSideEvents.EndCallback = "OnEndCallback"; //Generic configurations settings.Configure(GridDataChecklist, html, viewContext); SelectRow((int)(ViewData[CurrentChecklistId] ?? 0), (string)(ViewData[CurrentChecklistName] ?? string.Empty), ref settings); }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { var gridData = InitializeChecklistFindingsGridData(html); settings.Configure(gridData, html, viewContext); var isReadOnly = (bool)(ViewData["ReadOnly"] ?? false); settings.CommandButtonInitialize = (o, e) => { if ((e.ButtonType == ColumnCommandButtonType.Update) || (e.ButtonType == ColumnCommandButtonType.Cancel)) { e.Visible = !isReadOnly; } }; settings.ClientSideEvents.BeginCallback = "function (s, e) { checklistFindingGridOnBeginCallback (s,e) }"; //settings.ClientSideEvents.EndCallback = "function (s, e) { checklistFindingGridOnEndCallback (s,e) }"; settings.CommandColumn.Visible = false; settings.SettingsDetail.ShowDetailRow = true; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; settings.SetDetailRowTemplateContent(c => { var loapFindingId = (Guid)DataBinder.Eval(c.DataItem, gridData.Key); var loapChecklistId = Questions.FirstOrDefault().RigOapChecklistId; if (!c.Grid.IsEditing && !c.Grid.IsNewRowEditing) { html.RenderAction("OpenCapaPartial", new { Controller = "Capa", Area = "IRMA", source = "Findings", sourceId = loapFindingId, sourceUrl = "/cOap/OapProtocol/List/" + loapChecklistId }); } }); settings.CellEditorInitialize = (s, e) => { //e.Editor.ReadOnly = false; }; }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { settings.CommandColumn.Width = Unit.Percentage(2); InitializeGridData(GridData, "CreateMaster", "UpdateMaster", "DeleteMaster"); //Master Grid Specific configurations settings.KeyFieldName = GridData.Key; settings.Name = $"{GridData.Name}"; settings.SettingsDetail.ShowDetailRow = true; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; //Generic configurations settings.Configure(GridData, html, viewContext); settings.SetDetailRowTemplateContent(c => { var loapTypeName = (string)DataBinder.Eval(c.DataItem, GridData.DisplayColumnName); var loapTypeId = (int)DataBinder.Eval(c.DataItem, GridData.Key); if (!c.Grid.IsEditing && !c.Grid.IsNewRowEditing) { ChildGridData.ToolBarOptions.SearchName = $"{ChildGridData.ToolBarOptions.SearchName}_{loapTypeId}"; //Important to use RenderAction and Not Action todisplay the child grid rows html.RenderAction(ChildGridData.Action, ChildGridData.Controller, new { oapTypeId = loapTypeId, oapTypeName = loapTypeName }); } }); int oapTypeInputId = (int)(ViewData[CurrentTypeId] ?? 0); string oapTypeInputName = (string)(ViewData[CurrentTypeName] ?? string.Empty); //Select the Current Row when it defined. if (oapTypeInputId != 0) { settings.Columns.Grid.Selection.SelectRowByKey(oapTypeInputId); } }
public void ConfigureChild(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { int oapChecklistTopicId = (int)(ViewData[CurrentTopicId] ?? 0); string oapChecklistTopicName = (string)(ViewData[CurrentTopicName] ?? string.Empty); ChildGridData.ToolBarOptions.SearchName = $"{ChildGridData.ToolBarOptions.SearchName}_{oapChecklistTopicId}"; InitializeChildGridData(ChildGridData, "CreateChecklistQuestion", "UpdateChecklistQuestion", "DeleteChecklistQuestion", oapChecklistTopicId, oapChecklistTopicName); ChildGridData.Name = $"{ChildGridData.Name}_{oapChecklistTopicName}_{oapChecklistTopicId}"; //very sensitive to characters only use Unserscore. using anyother charaters other than alphabets could cause grid display issues. settings.SettingsDetail.MasterGridName = $"{GridData.Name}"; // GridInformation.MasterGridName; settings.Configure(ChildGridData, html, viewContext); settings.SettingsDetail.ShowDetailRow = true; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; settings.SetDetailRowTemplateContent(c => { var loapChecklistQuestionName = (string)DataBinder.Eval(c.DataItem, ChildGridData.DisplayColumnName); var loapChecklistQuestionId = (int)DataBinder.Eval(c.DataItem, ChildGridData.Key); //Calling SubChild Grids in Child Grid SubChildRelatedQuestionGridData.ToolBarOptions.SearchName = $"{SubChildRelatedQuestionGridData.ToolBarOptions.SearchName}_{loapChecklistQuestionId}"; SubChildTagGridData.ToolBarOptions.SearchName = $"{SubChildTagGridData.ToolBarOptions.SearchName}_{loapChecklistQuestionId}"; if (!c.Grid.IsEditing && !c.Grid.IsNewRowEditing) { //Important to use RenderAction and Not Action todisplay the child grid rows html.RenderAction(SubChildRelatedQuestionGridData.Action, SubChildRelatedQuestionGridData.Controller, new { oapChecklistQuestionId = loapChecklistQuestionId, oapChecklistQuestionName = loapChecklistQuestionName }); html.RenderAction(SubChildTagGridData.Action, SubChildTagGridData.Controller, new { oapChecklistQuestionId = loapChecklistQuestionId, oapChecklistQuestionName = loapChecklistQuestionName }); } }); }
public override void Configure(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { InitializeGridData(GridData, "CreateChecklistTopic", "UpdateChecklistTopic", "DeleteChecklistTopic"); //Generic configurations settings.Configure(GridData, html, viewContext); settings.SettingsDetail.ShowDetailRow = true; settings.SettingsDetail.AllowOnlyOneMasterRowExpanded = false; settings.SetDetailRowTemplateContent(c => { var loapChecklistTopicName = (string)DataBinder.Eval(c.DataItem, GridData.DisplayColumnName); var loapChecklistTopicId = (int)DataBinder.Eval(c.DataItem, GridData.Key); ChildGridData.ToolBarOptions.SearchName = $"{ChildGridData.ToolBarOptions.SearchName}_{loapChecklistTopicId}"; if (!c.Grid.IsEditing && !c.Grid.IsNewRowEditing) { //Important to use RenderAction and Not Action todisplay the child grid rows html.RenderAction(ChildGridData.Action, ChildGridData.Controller, new { oapChecklistTopicId = loapChecklistTopicId, oapChecklistTopicName = loapChecklistTopicName }); } }); //settings.ClientSideEvents.FocusedRowChanged = "OnFindingsFocusedRowChanged"; int oapChecklistTopicId = (int)(ViewData[CurrentTopicId] ?? 0); string oapChecklistTopicName = (string)(ViewData[CurrentTopicName] ?? string.Empty); //Select the Current Row when it defined. if (oapChecklistTopicId != 0) { settings.Columns.Grid.Selection.SelectRowByKey(oapChecklistTopicId); } }
public virtual void ConfigureWorkInstructions(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { var gridData = InitializeChecklistExecutionWorkInstructionsGridData(html, viewContext); settings.Configure(gridData, html, viewContext); }
public virtual void ConfigureThirdPartyJobActivities(GridViewSettings settings, HtmlHelper html, ViewContext viewContext) { var gridData = InitializeChecklistExecutionThirdPartyJobActivitiesGridData(html, viewContext); settings.Configure(gridData, html, viewContext); }