public static void HiglightGridRowFilter(ref Infragistics.WebUI.UltraWebGrid.UltraGridRow r, string txtFilter, params int[] columnIndex) { string filter = txtFilter.Trim(); if (filter != string.Empty) { bool isOk = true; foreach (Infragistics.WebUI.UltraWebGrid.UltraGridCell c in r.Cells) { isOk = true; if (columnIndex != null) { for (int i = 0; i < columnIndex.Length; i++) { isOk = isOk && (c.Column.Index != columnIndex[i]); } } if ((c.Column.Type == Infragistics.WebUI.UltraWebGrid.ColumnType.NotSet) && (c.Text != null) && isOk) { c.Text = Utils.CReplace(c.Text, filter, "<font color=red><b>" + filter + "</b></font>", 1); } } } }
private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row; if (txtFilter.Text.Length > 0) { string filter = txtFilter.Text.Trim().ToLower(); string c; bool keep = false; for (int i = 1; i < 6; i++) { c = r.Cells[i].Text; if (c != null && c.ToLower().IndexOf(filter) >= 0) { keep = true; break; } } if (keep) { UITools.HiglightGridRowFilter(ref r, txtFilter.Text); } else { r.Delete(); } } }
public static void HiglightGridRowFilter(ref Infragistics.WebUI.UltraWebGrid.UltraGridRow r, string txtFilter, bool deleteNonMatchingRows) { string filter = txtFilter.Trim(); if (filter != string.Empty) { // Hide sort rows if necessary if (r.Cells.FromKey("s_a") != null) { r.Band.Columns.Remove(r.Band.Columns.FromKey("s_a")); } bool keep = false; foreach (Infragistics.WebUI.UltraWebGrid.UltraGridCell c in r.Cells) { if ((c.Column.Type == Infragistics.WebUI.UltraWebGrid.ColumnType.NotSet) && (c.Text != null)) { c.Text = Utils.CReplace(c.Text, filter, "<font color=red><b>" + filter + "</b></font>", 1); if (c.Text.IndexOf("<font color=red><b>" + filter + "</b></font>") > 0) { keep = true; } } } if (!keep && deleteNonMatchingRows) { r.Delete(); } } }
protected void ugrdColumn_SelectedRowsChange(object sender, Infragistics.WebUI.UltraWebGrid.SelectedRowsEventArgs e) { Infragistics.WebUI.UltraWebGrid.UltraGridRow ugrd = e.SelectedRows[0]; this.ISEQ = DataTypeUtility.GetToInt32(ugrd.Cells.FromKey("SEQ").Value); if (ugrd.Cells.FromKey("COL_TYPE").Value.ToString() == "FIXEDKEY") { iBtnSave.Visible = false; } else { iBtnSave.Visible = true; } WebUtility.FindByValueRadioButtonList(rblVISIBLE_YN, ugrd.Cells.FromKey("VISIBLE_YN").Value.ToString()); WebUtility.FindByValueRadioButtonList(rblUSE_YN, ugrd.Cells.FromKey("USE_YN").Value.ToString()); txtCOL_ORDER.Text = ugrd.Cells.FromKey("COL_ORDER").Value.ToString(); txtCOL_KEY.Text = ugrd.Cells.FromKey("COL_KEY").Value.ToString(); txtCOL_NAME.Text = ugrd.Cells.FromKey("COL_NAME").Value.ToString(); txtCOL_DESC.Text = ugrd.Cells.FromKey("COL_DESC").Value.ToString(); WebUtility.FindByValueDropDownList(ddlTYPE, ugrd.Cells.FromKey("COL_TYPE").Value.ToString()); txtCOL_WIDTH.Text = ugrd.Cells.FromKey("COL_WIDTH").Value.ToString(); WebUtility.FindByValueDropDownList(ddlALIGN, ugrd.Cells.FromKey("COL_ALIGN").Value.ToString()); WebUtility.FindByValueDropDownList(ddlDATATYPE, ugrd.Cells.FromKey("DATA_TYPE").Value.ToString()); txtPROC_NAME.Text = ugrd.Cells.FromKey("PROC_NAME").Value.ToString(); WebUtility.FindByValueDropDownList(ddlPROCTYPE, ugrd.Cells.FromKey("PROC_TYPE").Value.ToString()); }
private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { // Update level name HyperCatalog.Business.ItemLevel level = HyperCatalog.Business.ItemLevel.GetByKey(Convert.ToInt32(e.Row.Cells.FromKey("LevelId").Value)); if (level != null) { e.Row.Cells.FromKey("LevelName").Text = level.Name; } // Update filter if (txtFilter.Text.Length > 0) { Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row; string filter = txtFilter.Text.Trim().ToLower(); string itemName = r.Cells.FromKey("ItemName").Value.ToString().ToLower(); string levelName = r.Cells.FromKey("LevelName").Value.ToString().ToLower(); if ((itemName.Length == 0 || itemName.IndexOf(filter) < 0) && (levelName.Length == 0 || levelName.IndexOf(filter) < 0)) { dg.Rows.Remove(r); } else { UITools.HiglightGridRowFilter(ref r, txtFilter.Text); } } }
private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { if (txtFilter.Text.Length > 0) { Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row; UITools.HiglightGridRowFilter(ref r, txtFilter.Text); } }
public static void HiglightGridRowFilter2(ref Infragistics.WebUI.UltraWebGrid.UltraGridRow r, string txtFilter, bool enableIntelligentSort, int sortColIndex) { string filter = txtFilter.Trim(); HiglightGridRowFilter(ref r, filter); if (filter == string.Empty && enableIntelligentSort) { Infragistics.WebUI.UltraWebGrid.UltraWebGrid g = r.Band.Grid; Utils.EnableIntelligentSort(ref g, sortColIndex); } }
private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { // update input type e.Row.Cells.FromKey("InputType").Text = InputFormContainer.GetTypeFromString(e.Row.Cells.FromKey("InputType").Text).ToString(); // update filter if (txtFilter.Text.Length > 0) { Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row; UITools.HiglightGridRowFilter(ref r, txtFilter.Text); } }
protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { if(_facade==null){_facade = new FacadeFactory(base.DataProvider).CreateRMAFacade();} object obj = _facade.GetErrorSymptom( row.Cells.FromKey("ErrorSymptom").Text.ToString() ); if (obj != null) { return (ErrorSymptom)obj; } return null; }
private void SetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { this.txtConfirmQtyEdit.Text = row.Cells.FromKey("ConfirmQty").Text.ToString(); this.txtConfirmScrapQtyEdit.Text = row.Cells.FromKey("ScrapQty").Text.ToString(); this.txtMOLocationEdit.Text = row.Cells.FromKey("MOLocation").Text.ToString(); this.txtGradeEdit.Text = row.Cells.FromKey("Grade").Text.ToString(); this.txtOPCodeEdit.Text = row.Cells.FromKey("MOOP").Text.ToString(); this.txtConfirmQtyEdit.Enabled = false; this.txtMOLocationEdit.Enabled = false; this.txtGradeEdit.Enabled = false; this.txtOPCodeEdit.Enabled = false; }
private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { bool keep = true; string chunkValue = e.Row.Cells.FromKey("Value").Text; if ((e.Row.Cells.FromKey("ItemSku").Value != null) && (e.Row.Cells.FromKey("ItemSku").Text.Length > 0)) { e.Row.Cells.FromKey("ItemName").Text = e.Row.Cells.FromKey("ItemName").Text + " [" + e.Row.Cells.FromKey("ItemSku").Text + "]"; } if (txtFilter.Text.Length > 0) { string filter = txtFilter.Text.ToLower(); string itemName = e.Row.Cells.FromKey("ItemName").Text.ToLower(); if ((itemName.IndexOf(filter) < 0) && (chunkValue.IndexOf(filter) < 0)) { keep = false; e.Row.Delete(); } else { Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row; UITools.HiglightGridRowFilter(ref r, txtFilter.Text); } } if (keep) { e.Row.Cells.FromKey("ChunkStatus").Text = "<img src='/hc_v4/img/S" + e.Row.Cells.FromKey("ChunkStatus").Text.Substring(0, 1) + ".gif'>"; if (chunkValue == HyperCatalog.Business.Chunk.BlankValue) { e.Row.Cells.FromKey("Value").Text = HyperCatalog.Business.Chunk.BlankText; e.Row.Cells.FromKey("Value").Style.CustomRules = string.Empty; } else { e.Row.Cells.FromKey("Value").Text = UITools.HtmlEncode(chunkValue).Replace(Environment.NewLine, "<br/>"); } if (IsRegion(CultureList.SelectedValue.ToString())) { e.Row.Cells.FromKey("ItemName").Text = "<a href='../../../redirect.aspx?p=UI/Acquire/qde.aspx&c=" + CultureList.SelectedValue.ToString() + "&i=" + e.Row.Cells.FromKey("ItemId").Text + "' target='_BLANK'\">" + e.Row.Cells.FromKey("ItemName").Text + "</a>"; } else { e.Row.Cells.FromKey("ItemName").Text = "<a href='../../../redirect.aspx?p=UI/Globalize/QDETranslate.aspx&c=" + CultureList.SelectedValue.ToString() + "&i=" + e.Row.Cells.FromKey("ItemId").Text + "' target='_BLANK'\">" + e.Row.Cells.FromKey("ItemName").Text + "</a>"; } } }
protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } object obj = _facade.GetIQCHead(row.Cells[1].Text.ToString()); if (obj != null) { return((IQCHead)obj); } return(null); }
protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { if (_facade == null) { _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade(); } object obj = _facade.GetErrorCodeItem2Route(row.Cells[1].Text.ToString(), row.Cells[2].Text.ToString(), GlobalVariables.CurrentOrganizations.First().OrganizationID); if (obj != null) { return((ErrorCodeItem2Route)obj); } return(null); }
protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } object obj = _facade.GetIQCDetail(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtIQCNo.Text)), row.Cells[1].Text.ToString()); if (obj != null) { return((IQCDetail)obj); } return(null); }
protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { if (_facade == null) { _facade = new FacadeFactory(base.DataProvider).CreateItemFacade(); } object obj = _facade.GetItemLocation(ItemCode, row.Cells.FromKey("ABValue").Text.ToString(), GlobalVariables.CurrentOrganizations.First().OrganizationID); if (obj != null) { return((ItemLocation)obj); } return(null); }
protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { Trace.Warn("Users", " ->dg_InitializeRow"); Infragistics.WebUI.UltraWebGrid.UltraGridCell c; c = e.Row.Cells[_LastLoginPos]; if (c.Value != null && c.Value != DBNull.Value) { c.Value = HyperCatalog.Shared.SessionState.User.FormatUtcDate(Convert.ToDateTime(c.Value)); } if (txtFilter.Text != string.Empty) { Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row; UITools.HiglightGridRowFilter(ref r, txtFilter.Text); } }
protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { if (facade == null) { facade = new InventoryFacade(base.DataProvider); } object obj = facade.GetInvFormula(row.Cells[1].Text.ToString()); if (obj != null) { return((InvFormula)obj); } return(null); }
protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { if (_orderFacade == null) { _orderFacade = new FacadeFactory(base.DataProvider).CreateOrderFacade(); } object obj = _orderFacade.GetOrderDetail( row.Cells.FromKey("PartnerCode").Text.ToString(), row.Cells.FromKey("ItemCode").Text.ToString(), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(OrderNO))); if (obj != null) { return((OrderDetail)obj); } return(null); }
private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { if (txtFilter.Text.Length > 0) { Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row; string filter = txtFilter.Text.Trim().ToLower(); string userName = r.Cells.FromKey("UserName").Value.ToString().ToLower(); string orgName = r.Cells.FromKey("OrgName").Value.ToString().ToLower(); if ((userName.Length == 0 || userName.IndexOf(filter) < 0) && (orgName.Length == 0 || orgName.IndexOf(filter) < 0)) { dg.Rows.Remove(r); } else { UITools.HiglightGridRowFilter(ref r, txtFilter.Text); } } }
private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { string path = e.Row.Cells.FromKey("AbsolutePath").Text; string sLevel = string.Empty; string[] parents = path.Split('/'); for (int i = 2; i < parents.Length; i++) { sLevel += " "; } string code = e.Row.Cells.FromKey("Code").Text; if (code != string.Empty) { code = "[" + code + "] "; } e.Row.Cells.FromKey("Name").Text = sLevel + code + e.Row.Cells.FromKey("Name").Text; Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row; UITools.HiglightGridRowFilter(ref r, txtFilter.Text); }
private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row; string itemName = r.Cells.FromKey("ItemName").Text; r.Cells.FromKey("ItemName").Text = "[" + r.Cells.FromKey("LevelId").Text + "] " + itemName; bool isDeleted = false; if (txtFilter.Text.Length > 0) { string filter = txtFilter.Text.Trim().ToLower(); if (itemName.Length == 0 || itemName.ToLower().IndexOf(filter) < 0) { isDeleted = true; r.Delete(); } else { UITools.HiglightGridRowFilter(ref r, txtFilter.Text); } } if (!isDeleted) { // Display PLs if (r.Cells.FromKey("PLs") != null && r.Cells.FromKey("PLs").Text != null && r.Cells.FromKey("PLs").Text.Length > 0) { string[] PLs = r.Cells.FromKey("PLs").Text.Split(','); string sPLs = string.Empty; if (r.Cells.FromKey("DefinedPLs") != null && r.Cells.FromKey("DefinedPLs").Text != null && r.Cells.FromKey("DefinedPLs").Text.Length > 0) { string definedPLs = r.Cells.FromKey("DefinedPLs").Text; for (int i = 0; i < PLs.Length; i++) { if (sPLs.Length > 0) { sPLs += ", "; } if (definedPLs.IndexOf(PLs[i]) >= 0) { sPLs += "<font color=red>" + PLs[i] + "</font>"; } else { sPLs += PLs[i]; } } } else { for (int i = 0; i < PLs.Length; i++) { if (sPLs.Length > 0) { sPLs += ", "; } sPLs += PLs[i]; } } r.Cells.FromKey("PLs").Text = sPLs; } } }
public static void HiglightGridRowFilter(ref Infragistics.WebUI.UltraWebGrid.UltraGridRow r, string txtFilter) { HiglightGridRowFilter(ref r, txtFilter, false); }