//end bind combos protected void dxcbocountry_Init(object sender, EventArgs e) { DevExpress.Web.ASPxEditors.ASPxComboBox _cbo = (DevExpress.Web.ASPxEditors.ASPxComboBox)sender; try { string _path = AppDomain.CurrentDomain.BaseDirectory; _path += "xml\\country_iso.xml"; // pass _qryFilter to have keyword-filter RSS Feed // i.e. _qryFilter = XML -> entries with XML will be returned DataSet _ds = new DataSet(); _ds.ReadXml(_path); DataView _dv = _ds.Tables[0].DefaultView; //_dv.RowFilter = "ddls ='pallet'"; _cbo.DataSource = _dv; _cbo.DataBind(); _cbo.Value = null; } catch (Exception ex) { Response.Write(ex.ToString()); } }
/// <summary> /// incremental filtering and partial loading of name and address book for speed /// both ItemsRequestedByFilterCondition and ItemRequestedByValue must be set up for this to work /// </summary> /// <param name="source"></param> /// <param name="e"></param> protected void dxcbocompany_ItemsRequestedByFilterCondition(object source, DevExpress.Web.ASPxEditors.ListEditItemsRequestedByFilterConditionEventArgs e) { DevExpress.Web.ASPxEditors.ASPxComboBox _combo = (DevExpress.Web.ASPxEditors.ASPxComboBox)source; string _filter = !string.IsNullOrEmpty(e.Filter) ? e.Filter: ""; { //use datareaders - much faster than loading into collections string[] _cols = { "NameAndAddressBook.CompanyID, NameAndAddressBook.CompanyName, NameAndAddressBook.Customer" }; //SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Tables.NameAndAddressBook).Paged(e.BeginIndex + 1, e.EndIndex +1, "CompanyID").WhereExpression("CompanyName").Like(string.Format("%{0}%", e.Filter.ToString())).And("Customer").IsEqualTo(true) ; SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Tables.NameAndAddressBook).Paged(e.BeginIndex + 1, e.EndIndex + 1, "CompanyID").WhereExpression("CompanyName").Like(string.Format("%{0}%", e.Filter.ToString())); IDataReader _rd = _query.ExecuteReader(); _combo.DataSource = _rd; _combo.ValueField = "CompanyID"; _combo.TextField = "CompanyName"; _combo.DataBind(); //use sqldatasource //this.sdsCompany.ConnectionString = ConfigurationManager.ConnectionStrings["PublishipSQLConnectionString"].ToString(); //this.sdsCompany.SelectCommand = @"SELECT [CompanyID], [CompanyName], [Customer] FROM (select [CompanyID], [CompanyName], [Customer], row_number()over(order by t.[CompanyName]) as [rn] from [NameAndAddressBook] as t where (([CompanyName]) LIKE @filter)) as st where st.[rn] between @startIndex and @endIndex;"; //this.sdsCompany.SelectParameters.Clear(); //this.sdsCompany.SelectParameters.Add("filter", TypeCode.String, string.Format("%{0}%", _filter)); //this.sdsCompany.SelectParameters.Add("startindex", TypeCode.Int32, (e.BeginIndex + 1).ToString()); //this.sdsCompany.SelectParameters.Add("endindex", TypeCode.Int32, (e.EndIndex + 1).ToString()); //_combo.DataSource = this.sdsCompany; //_combo.DataBind(); } }
protected void BindAspxDdl(DevExpress.Web.ASPxEditors.ASPxComboBox ddl, string column, string regex, string txtField, string valField) { ddl.DataSource = dept.GetTreeList(column, regex); ddl.TextField = txtField; ddl.ValueField = valField; ddl.DataBind(); }
protected void BindAspxDdl(DevExpress.Web.ASPxEditors.ASPxComboBox ddl, string where, string txtField, string valField) { ddl.DataSource = dept.GetList2(where); ddl.TextField = txtField; ddl.ValueField = valField; ddl.DataBind(); }
public void GetViewState(Panel p) { string leftname = Request.Url.AbsoluteUri.ToString().Replace(".", "/"); leftname = leftname.Split('/')[leftname.Split('/').Length - 3] + "_" + leftname.Split('/')[leftname.Split('/').Length - 2] + "_"; for (int i = 0; i < p.Controls.Count; i++) { string id = p.Controls[i].ClientID; string type = p.Controls[i].GetType().Name; switch (type) { case "ASPxButtonEdit": DevExpress.Web.ASPxEditors.ASPxButtonEdit tmpASPxButtonEdit = (DevExpress.Web.ASPxEditors.ASPxButtonEdit)p.Controls[i]; if (Session[leftname + id] != null) { tmpASPxButtonEdit.Value = Session[leftname + id].ToString(); } break; case "ASPxDateEdit": DevExpress.Web.ASPxEditors.ASPxDateEdit tmpASPxDateEdit = (DevExpress.Web.ASPxEditors.ASPxDateEdit)p.Controls[i]; if (Session[leftname + id] != null) { if (Session[leftname + id].ToString() == "") { tmpASPxDateEdit.Value = null; } else { tmpASPxDateEdit.Value = DateTime.Parse(Session[leftname + id].ToString()); } } break; case "ASPxComboBox": DevExpress.Web.ASPxEditors.ASPxComboBox tmpASPxComboBox = (DevExpress.Web.ASPxEditors.ASPxComboBox)p.Controls[i]; if (Session[leftname + id] != null) { tmpASPxComboBox.Value = Session[leftname + id].ToString(); } break; case "ASPxTextBox": DevExpress.Web.ASPxEditors.ASPxTextBox tmpASPxTextBox = (DevExpress.Web.ASPxEditors.ASPxTextBox)p.Controls[i]; if (Session[leftname + id] != null) { tmpASPxTextBox.Value = Session[leftname + id].ToString(); } break; } } }
protected void dxcbocompany_ItemRequestedByValue(object source, DevExpress.Web.ASPxEditors.ListEditItemRequestedByValueEventArgs e) { DevExpress.Web.ASPxEditors.ASPxComboBox _combo = (DevExpress.Web.ASPxEditors.ASPxComboBox)source; //use datareaders - much faster than loading into collections string[] _cols = { "NameAndAddressBook.CompanyID, NameAndAddressBook.CompanyName, NameAndAddressBook.Customer" }; Int32 _id = wwi_func.vint(e.Value.ToString()); SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Tables.NameAndAddressBook).WhereExpression("CompanyID").IsEqualTo(_id); IDataReader _rd = _query.ExecuteReader(); _combo.DataSource = _rd; _combo.ValueField = "CompanyID"; _combo.TextField = "CompanyName"; _combo.DataBind(); }
protected void dxcbotitle_ItemRequestedByValue(object source, DevExpress.Web.ASPxEditors.ListEditItemRequestedByValueEventArgs e) { DevExpress.Web.ASPxEditors.ASPxComboBox _combo = (DevExpress.Web.ASPxEditors.ASPxComboBox)source; int _printerid = wwi_func.vint(this.dxlblprinter2.Text.ToString()); //use datareaders - much faster than loading into collections string[] _cols = { "PublishipAdvanceTitleTable.PATitleID, PublishipAdvanceTitleTable.Title, PublishipAdvanceOrderTable.PrinterID" }; Int32 _id = wwi_func.vint(e.Value.ToString()); SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Tables.PublishipAdvanceOrderTable).LeftOuterJoin("PublishipAdvanceTitleTable", "PAOrderID", "PublishipAdvanceOrderTable", "OrderID").WhereExpression("PATitleID").IsEqualTo(_id).And("PrinterId").IsEqualTo(_printerid); IDataReader _rd = _query.ExecuteReader(); _combo.DataSource = _rd; _combo.ValueField = "PATitleID"; _combo.TextField = "Title"; _combo.DataBind(); }
//end send advance email #endregion #region company filters /// <summary> /// incremental filtering and partial loading of name and address book for speed /// both ItemsRequestedByFilterCondition and ItemRequestedByValue must be set up for this to work /// </summary> /// <param name="source"></param> /// <param name="e"></param> protected void dxcbocompany_ItemsRequestedByFilterCondition(object source, DevExpress.Web.ASPxEditors.ListEditItemsRequestedByFilterConditionEventArgs e) { DevExpress.Web.ASPxEditors.ASPxComboBox _combo = (DevExpress.Web.ASPxEditors.ASPxComboBox)source; string _filter = !string.IsNullOrEmpty(e.Filter) ? e.Filter : ""; { //use datareaders - much faster than loading into collections string[] _cols = { "NameAndAddressBook.CompanyID, NameAndAddressBook.CompanyName, NameAndAddressBook.Customer" }; //SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Tables.NameAndAddressBook).Paged(e.BeginIndex + 1, e.EndIndex +1, "CompanyID").WhereExpression("CompanyName").Like(string.Format("%{0}%", e.Filter.ToString())).And("Customer").IsEqualTo(true) ; SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Tables.NameAndAddressBook).Paged(e.BeginIndex + 1, e.EndIndex + 1, "CompanyID").WhereExpression("CompanyName").Like(string.Format("%{0}%", e.Filter.ToString())); IDataReader _rd = _query.ExecuteReader(); _combo.DataSource = _rd; _combo.ValueField = "CompanyID"; _combo.TextField = "CompanyName"; _combo.DataBind(); } }
public void SetViewState(Panel p) { //DataTable dt = GetWebSession(); string leftname = GetUrl(1); Session[leftname + "url"] = leftname;//是否已经进入过该页面 for (int i = 0; i < p.Controls.Count; i++) { string id = p.Controls[i].ClientID; string type = p.Controls[i].GetType().Name; switch (type) { case "ASPxButtonEdit": DevExpress.Web.ASPxEditors.ASPxButtonEdit tmpASPxButtonEdit = (DevExpress.Web.ASPxEditors.ASPxButtonEdit)p.Controls[i]; Session[leftname + id] = tmpASPxButtonEdit.Value; break; case "ASPxDateEdit": DevExpress.Web.ASPxEditors.ASPxDateEdit tmpASPxDateEdit = (DevExpress.Web.ASPxEditors.ASPxDateEdit)p.Controls[i]; if (tmpASPxDateEdit.Value == "" || tmpASPxDateEdit.Value == null) { Session[leftname + id] = ""; } else { Session[leftname + id] = DateTime.Parse(tmpASPxDateEdit.Value.ToString()).ToString("yyyy-MM-dd"); } break; case "ASPxComboBox": DevExpress.Web.ASPxEditors.ASPxComboBox tmpASPxComboBox = (DevExpress.Web.ASPxEditors.ASPxComboBox)p.Controls[i]; Session[leftname + id] = tmpASPxComboBox.Value; break; case "ASPxTextBox": DevExpress.Web.ASPxEditors.ASPxTextBox tmpASPxTextBox = (DevExpress.Web.ASPxEditors.ASPxTextBox)p.Controls[i]; Session[leftname + id] = tmpASPxTextBox.Value; break; } } }
protected void dxcboContainer_ItemsRequestedByFilterCondition(object source, DevExpress.Web.ASPxEditors.ListEditItemsRequestedByFilterConditionEventArgs e) { DevExpress.Web.ASPxEditors.ASPxComboBox _combo = (DevExpress.Web.ASPxEditors.ASPxComboBox)source; string _filter = !string.IsNullOrEmpty(e.Filter) ? e.Filter : ""; //use datareaders - much faster than loading into collections string[] _cols = { "ContainerSubID", "ContainerNumber" }; string[] _sort = { "ContainerNumber" }; //SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Tables.NameAndAddressBook).Paged(e.BeginIndex + 1, e.EndIndex + 1, "CompanyID").WhereExpression("CompanyName").Like(string.Format("%{0}%", e.Filter.ToString())); SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Views.PearsonRugbyContainerView).Paged(e.BeginIndex + 1, e.EndIndex + 1).Where("ContainerNumber").StartsWith(string.Format("{0}%", _filter)); IDataReader _rd = _query.ExecuteReader(); _combo.DataSource = _rd; _combo.ValueField = "ContainerSubID"; _combo.TextField = "ContainerNumber"; _combo.DataBindItems(); }
//container search protected void dxcboContainer_ItemRequestedByValue(object source, DevExpress.Web.ASPxEditors.ListEditItemRequestedByValueEventArgs e) { DevExpress.Web.ASPxEditors.ASPxComboBox _combo = (DevExpress.Web.ASPxEditors.ASPxComboBox)source; Int32 _id = 0; if (e.Value != null) { _id = wwi_func.vint(e.Value.ToString()); } //use datareaders - much faster than loading into collections string[] _cols = { "ContainerSubID", "ContainerNumber" }; SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Views.PearsonRugbyContainerView).WhereExpression("ContainerSubID").IsEqualTo(_id); IDataReader _rd = _query.ExecuteReader(); _combo.DataSource = _rd; _combo.ValueField = "ContainerSubID"; _combo.TextField = "ContainerNumber"; _combo.DataBindItems(); }
//end pdf #endregion #region incremental filtering for previous titles /// <summary> /// incremental filtering and partial loading of name and address book for speed /// both ItemsRequestedByFilterCondition and ItemRequestedByValue must be set up for this to work /// </summary> /// <param name="source"></param> /// <param name="e"></param> protected void dxcbotitle_ItemsRequestedByFilterCondition(object source, DevExpress.Web.ASPxEditors.ListEditItemsRequestedByFilterConditionEventArgs e) { //restricted to logged in user DevExpress.Web.ASPxEditors.ASPxComboBox _combo = (DevExpress.Web.ASPxEditors.ASPxComboBox)source; int _printerid = wwi_func.vint(this.dxlblprinter2.Text.ToString()); string _filter = !string.IsNullOrEmpty(e.Filter) ? e.Filter : ""; { //use datareaders - much faster than loading into collections string[] _cols = { "PublishipAdvanceTitleTable.PATitleID, PublishipAdvanceTitleTable.Title, PublishipAdvanceOrderTable.PrinterID" }; //string[] _cols = { "PublishipAdvanceTitleTable.PATitleID, PublishipAdvanceTitleTable.Title" }; SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Tables.PublishipAdvanceOrderTable).LeftOuterJoin("PublishipAdvanceTitleTable", "PAOrderID", "PublishipAdvanceOrderTable", "OrderID").Paged(e.BeginIndex + 1, e.EndIndex + 1, "PATitleID").WhereExpression("Title").Like(string.Format("%{0}%", e.Filter.ToString())).And("PrinterId").IsEqualTo(_printerid); //SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Tables.PublishipAdvanceTitleTable).Paged(e.BeginIndex + 1, e.EndIndex + 1, "PATitleID").WhereExpression("Title").Like(string.Format("%{0}%", e.Filter.ToString())); IDataReader _rd = _query.ExecuteReader(); _combo.DataSource = _rd; _combo.ValueField = "PATitleID"; _combo.TextField = "Title"; _combo.DataBind(); } }
//****************************** /// <summary> /// disable auto populated fields on edit /// hide auto populated fields on new /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void dxgrdTarget_CellEditorInitialize(object sender, ASPxGridViewEditorEventArgs e) { if (e.Column.Name == "colTargetID" || e.Column.Name == "colUpdateUser" || e.Column.Name == "colInsertUser") { DevExpress.Web.ASPxEditors.ASPxTextBox _tx = ((DevExpress.Web.ASPxEditors.ASPxTextBox)e.Editor); if (e.Column.Grid.IsNewRowEditing) { _tx.ClientVisible = false; } else if (e.Column.Grid.IsEditing) { _tx.ClientEnabled = false; } } //end text columns if (e.Column.Name == "colInsertDate" || e.Column.Name == "colUpdateDate") { DevExpress.Web.ASPxEditors.ASPxDateEdit _dx = ((DevExpress.Web.ASPxEditors.ASPxDateEdit)e.Editor); if (e.Column.Grid.IsNewRowEditing) { _dx.ClientVisible = false; } else if (e.Column.Grid.IsEditing) { _dx.ClientEnabled = false; } } //290113 bind priority codes if (e.Column.Name == "colPriorityCode") { DevExpress.Web.ASPxEditors.ASPxComboBox _cb = ((DevExpress.Web.ASPxEditors.ASPxComboBox)e.Editor); _cb.DataBind(); } }
protected void dxcbocompany_ItemRequestedByValue(object source, DevExpress.Web.ASPxEditors.ListEditItemRequestedByValueEventArgs e) { DevExpress.Web.ASPxEditors.ASPxComboBox _combo = (DevExpress.Web.ASPxEditors.ASPxComboBox)source; //use datareaders - much faster than loading into collections string[] _cols = { "NameAndAddressBook.CompanyID, NameAndAddressBook.CompanyName, NameAndAddressBook.Customer" }; Int32 _id = wwi_func.vint(e.Value.ToString()); SubSonic.SqlQuery _query = DAL.Logistics.DB.Select(_cols).From(DAL.Logistics.Tables.NameAndAddressBook).WhereExpression("CompanyID").IsEqualTo(_id); IDataReader _rd = _query.ExecuteReader(); _combo.DataSource = _rd; _combo.ValueField = "CompanyID"; _combo.TextField = "CompanyName"; _combo.DataBind(); //this.sdsCompany.ConnectionString = ConfigurationManager.ConnectionStrings["PublishipSQLConnectionString"].ToString(); //this.sdsCompany.SelectCommand = @"SELECT [CompanyID], [CompanyName], [Customer] FROM [NNameAndAddressBook] WHERE (CompanyID = @ID)"; //this.sdsCompany.SelectParameters.Clear(); //this.sdsCompany.SelectParameters.Add("ID", TypeCode.Int32, e.Value.ToString()); //_combo.DataSource = this.sdsCompany; //_combo.DataBind(); }
private TableRow CreateMedicationRow(int rowIndex, ref string myscript) { try { HiddenField textboxButtonValue = this.Page.FindControl("txtButtonValue") as HiddenField; CommonFunctions.Event_Trap(this); Table _Table = new Table(); TableRow _TableRow = new TableRow(); _TableRow.ID = "TableMedicationRow_" + rowIndex; TableCell _TableCell0 = new TableCell(); TableCell _TableCell1 = new TableCell(); TableCell _TableCell2 = new TableCell(); TableCell _TableCell3 = new TableCell(); TableCell _TableCell4 = new TableCell(); TableCell _TableCell5 = new TableCell(); TableCell _TableCell6 = new TableCell(); TableCell _TableCell7 = new TableCell(); TableCell _TableCell8 = new TableCell(); //Added in ref to Task#2802 TableCell _TableCell9 = new TableCell(); _Table.ID = "TableMedication" + rowIndex; HtmlImage _ImgDeleteRow = new HtmlImage(); _ImgDeleteRow.ID = "ImageDelete" + rowIndex; _ImgDeleteRow.Src = "~/App_Themes/Includes/Images/deleteIcon.gif"; _ImgDeleteRow.Attributes.Add("class", "handStyle"); if (textboxButtonValue != null && textboxButtonValue.Value == "Refill") _ImgDeleteRow.Disabled = true; myscript += "var Imagecontext" + rowIndex + ";"; myscript += "var ImageclickCallback" + rowIndex + " ="; myscript += " Function.createCallback(ClientMedicationTitration.DeleteRow , Imagecontext" + rowIndex + ");"; myscript += "$addHandler($get('" + _ImgDeleteRow.ClientID + "'), 'click', ImageclickCallback" + rowIndex + ");"; DropDownList _DropDownListStrength = new DropDownList(); //Modified by Loveena in ref to Task#2799 to change the labels //_DropDownListStrength.Width = 270; _DropDownListStrength.Width = 190; _DropDownListStrength.Height = 20; if (textboxButtonValue != null && textboxButtonValue.Value == "Refill") _DropDownListStrength.Enabled = false; _DropDownListStrength.EnableViewState = true; _DropDownListStrength.ID = "DropDownListStrength" + rowIndex; TextBox _txtQuantity = new TextBox(); _txtQuantity.BackColor = System.Drawing.Color.White; _txtQuantity.MaxLength = 4; if (textboxButtonValue != null && textboxButtonValue.Value == "Refill") _txtQuantity.Enabled = false; _txtQuantity.ID = "TextBoxQuantity" + rowIndex; _txtQuantity.Width = 30; _txtQuantity.Height = 20; _txtQuantity.Visible = true; _txtQuantity.Style["text-align"] = "Right"; //Added by Loveena in ref to Task#2414 on 2nd March 2009 to calculate Pharmacy on press of tab key of Qty. myscript += "$create(Streamline.SmartClient.UI.TextBox, {'ignoreEnterKey':true,Decimal:true}, {'onBlur':ClientMedicationTitration.ManipulateRowValues},{},$get('" + _txtQuantity.ClientID + "'));"; //Code added by Loveena ends over here. DropDownList _DropDownListUnit = new DropDownList(); _DropDownListUnit.Width = 80; _DropDownListUnit.Height = 20; if (textboxButtonValue != null && textboxButtonValue.Value == "Refill") _DropDownListUnit.Enabled = false; _DropDownListUnit.ID = "DropDownListUnit" + rowIndex; DropDownList _DropDownListSchedule = new DropDownList(); _DropDownListSchedule.Width = 180; _DropDownListSchedule.Height = 20; if (textboxButtonValue != null && textboxButtonValue.Value == "Refill") _DropDownListSchedule.Enabled = false; _DropDownListSchedule.ID = "DropDownListSchedule" + rowIndex; DevExpress.Web.ASPxEditors.ASPxComboBox _comboBoxPharmText = new DevExpress.Web.ASPxEditors.ASPxComboBox(); _comboBoxPharmText.ID = "_comboBoxPharmacy" + rowIndex; _comboBoxPharmText.Visible = true; _comboBoxPharmText.Enabled = true; _comboBoxPharmText.DropDownStyle = DevExpress.Web.ASPxEditors.DropDownStyle.DropDown; _comboBoxPharmText.Style["text-align"] = "Right"; _comboBoxPharmText.ClientInstanceName = "ComboPharmaText" + rowIndex; _comboBoxPharmText.ClientSideEvents.KeyPress = "function(s, e) { ClientMedicationTitration.CheckKeyPress(" + rowIndex + "); }"; _comboBoxPharmText.EnableFocusedStyle = false; _comboBoxPharmText.EnableTheming = false; _comboBoxPharmText.ItemStyle.Border.BorderStyle = BorderStyle.None; _comboBoxPharmText.Font.Name = "Microsoft Sans Serif"; _comboBoxPharmText.Font.Size = new FontUnit(8.50, UnitType.Point); _comboBoxPharmText.Border.BorderColor = System.Drawing.ColorTranslator.FromHtml("#7b9ebd"); _comboBoxPharmText.Height = new Unit(6, UnitType.Pixel); #endregion TextBox _txtSample = new TextBox(); _txtSample.BackColor = System.Drawing.Color.White; _txtSample.MaxLength = 4; _txtSample.ID = "TextBoxSample" + rowIndex; _txtSample.Width = 40; _txtSample.Height = 20; _txtSample.Visible = true; _txtSample.Style["text-align"] = "Right"; myscript += "$create(Streamline.SmartClient.UI.TextBox, {'ignoreEnterKey':true,Decimal:true}, {},{},$get('" + _txtSample.ClientID + "'));"; TextBox _txtStock = new TextBox(); _txtStock.BackColor = System.Drawing.Color.White; _txtStock.MaxLength = 4; _txtStock.ID = "TextBoxStock" + rowIndex; _txtStock.Width = 40; _txtStock.Height = 20; _txtStock.Visible = true; _txtStock.Style["text-align"] = "Right"; myscript += "$create(Streamline.SmartClient.UI.TextBox, {'ignoreEnterKey':true,Decimal:true}, {},{},$get('" + _txtStock.ClientID + "'));"; Label _RowIdentifier = new Label(); _RowIdentifier.ID = "RowIdentifier" + rowIndex; //Added by Loveena in ref to Task#2802 HiddenField _hiddenAutoCalcAllowed = new HiddenField(); _hiddenAutoCalcAllowed.ID = "HiddenFieldAutoCalcAllowed" + rowIndex; _TableCell0.Controls.Add(_ImgDeleteRow); _TableCell1.Controls.Add(_DropDownListStrength); _TableCell2.Controls.Add(_txtQuantity); _TableCell3.Controls.Add(_DropDownListUnit); _TableCell4.Controls.Add(_DropDownListSchedule); //_TableCell5.Controls.Add(_txtPharma); _TableCell5.Controls.Add(_comboBoxPharmText); _TableCell6.Controls.Add(_txtSample); _TableCell7.Controls.Add(_txtStock); _TableCell8.Controls.Add(_RowIdentifier); _TableCell9.Controls.Add(_hiddenAutoCalcAllowed); _TableRow.Controls.Add(_TableCell0); _TableRow.Controls.Add(_TableCell1); _TableRow.Controls.Add(_TableCell2); _TableRow.Controls.Add(_TableCell3); _TableRow.Controls.Add(_TableCell4); _TableRow.Controls.Add(_TableCell5); _TableRow.Controls.Add(_TableCell6); _TableRow.Controls.Add(_TableCell7); _TableRow.Controls.Add(_TableCell8); _TableRow.Controls.Add(_TableCell9); _DropDownListStrength.Attributes.Add("onchange", "ClientMedicationTitration.onStrengthChange(this,'" + _DropDownListUnit.ClientID + "',null,'" + _txtQuantity.ClientID + "','" + rowIndex + "')"); _DropDownListSchedule.Attributes.Add("onBlur", "ClientMedicationTitration.onScheduleBlur(this)"); _DropDownListSchedule.Attributes.Add("onchange", "ClientMedicationTitration.onScheduleChange(" + rowIndex + ")"); _DropDownListUnit.Attributes.Add("onchange", "ClientMedicationTitration.onUnitChange(" + rowIndex + ")"); return _TableRow; } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) ex.Data["CustomExceptionInformation"] = ""; else ex.Data["CustomExceptionInformation"] = ""; if (ex.Data["DatasetInfo"] == null) ex.Data["DatasetInfo"] = ""; throw (ex); } }