public void FillCombobox4BD(Telerik.Web.UI.RadComboBox RCBSalesOrder, string argClientCode, string argBillingDocTypeCode, string argToDocType) { RCBSalesOrder.Items.Clear(); foreach (DataRow dr in GetSalesOrder4BD(argClientCode, argBillingDocTypeCode, argToDocType).Tables[0].Rows) { String itemText = dr["SODocCode"].ToString().Trim(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["SODocCode"].ToString().Trim() }; itemCollection.Attributes.Add("SODocCode", dr["SODocCode"].ToString().Trim()); itemCollection.Attributes.Add("SODocDate", dr["SODocDate"].ToString()); itemCollection.Attributes.Add("SOTypeCode", dr["SOTypeCode"].ToString()); itemCollection.Attributes.Add("BillToParty", dr["BillToParty"].ToString()); itemCollection.Attributes.Add("BillToPartyName", dr["BillToPartyName"].ToString()); itemCollection.Attributes.Add("DocumentCode", dr["DocumentCode"].ToString().Trim()); itemCollection.Attributes.Add("SalesOrganizationCode", dr["SalesOrganizationCode"].ToString()); itemCollection.Attributes.Add("DistChannelCode", dr["DistChannelCode"].ToString()); itemCollection.Attributes.Add("DivisionCode", dr["DivisionCode"].ToString()); itemCollection.Attributes.Add("SOStatus", dr["SOStatus"].ToString()); RCBSalesOrder.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBPurchaseOrder, string argClientCode, string argInBDeliveryDocTypeCode, string argToDocType) { RCBPurchaseOrder.Items.Clear(); foreach (DataRow dr in GetPurchaseOrder4InBDC(argClientCode, argInBDeliveryDocTypeCode, argToDocType).Tables[0].Rows) { String itemText = dr["PODocCode"].ToString().Trim(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["PODocCode"].ToString().Trim() }; itemCollection.Attributes.Add("PODocCode", dr["PODocCode"].ToString().Trim()); itemCollection.Attributes.Add("PODocDate", dr["PODocumentDate"].ToString()); itemCollection.Attributes.Add("POTypeCode", dr["POTypeCode"].ToString()); itemCollection.Attributes.Add("VendorCode", dr["VendorCode"].ToString()); itemCollection.Attributes.Add("VendorName", dr["Name1"].ToString()); itemCollection.Attributes.Add("PurchaseOrgCode", dr["PurchaseOrgCode"].ToString()); itemCollection.Attributes.Add("CompanyCode", dr["CompanyCode"].ToString()); itemCollection.Attributes.Add("SourcePlantCode", dr["SourcePlantCode"].ToString()); itemCollection.Attributes.Add("POStatus", dr["POStatus"].ToString()); RCBPurchaseOrder.Items.Add(itemCollection); itemCollection.DataBind(); } }
protected void BindChildGridDdl(Telerik.Web.UI.RadComboBox rcbComobo, string flag, string dataTextName, string dataValueName) { DataTable dt = GetDataTable(flag, "", ""); rcbComobo.DataTextField = dataTextName; rcbComobo.DataValueField = dataValueName; rcbComobo.DataSource = dt; rcbComobo.DataBind(); rcbComobo.SelectedValue = ""; }
protected void BindEmpLoyee(Telerik.Web.UI.RadComboBox rfbEmployee) { DataTable dt = GetDataTable("EMPLOYEE", 0, ""); rfbEmployee.DataTextField = "FirstName"; rfbEmployee.DataValueField = "EmployeeID"; rfbEmployee.DataSource = dt; rfbEmployee.DataBind(); rfbEmployee.SelectedValue = ""; }
protected override void CreateChildControls() { ctrl = new Telerik.Web.UI.RadComboBox(); ctrl.ID = "ctrl"; Controls.Add(ctrl); ctrl.HeaderTemplate = new MultiComboDropDownListBoxItemTemplate(this, ListItemType.Header, Me, this.ResourceKeyPrefix); ctrl.ItemTemplate = new MultiComboDropDownListBoxItemTemplate(this, ListItemType.Item, Me, this.ResourceKeyPrefix); ctrl.FooterTemplate = new MultiComboDropDownListBoxItemTemplate(this, ListItemType.Footer, Me, this.ResourceKeyPrefix); //ctrl.ItemDataBound += new RadComboBoxItemEventHandler(ctrl_ItemDataBound); }
protected void BindEmpLoyee(Telerik.Web.UI.RadComboBox rfbEmployee) { ILabFunctions theILabManager; theILabManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataTable dt = theILabManager.GetEmployeeDetails(); rfbEmployee.DataTextField = "EmployeeName"; rfbEmployee.DataValueField = "EmployeeID"; rfbEmployee.DataSource = dt; rfbEmployee.DataBind(); rfbEmployee.SelectedValue = ""; }
private string GetCheckBoxValues(Telerik.Web.UI.RadComboBox cbo) { string sValues = ""; //foreach (RadComboBoxItem item in cbo) for (int x = 0; x < cbo.Items.Count; x++) { if ((cbo.Items[x].FindControl("CheckBox1") as CheckBox).Checked) { sValues += "," + cbo.Items[x].Text; } } return(sValues); }
public void FillComboboxFields(Telerik.Web.UI.RadComboBox RCBTableField, string argTableName) { RCBTableField.Items.Clear(); foreach (DataColumn dc in GetDBTableFields(argTableName).Tables[0].Columns) { string itemText = dc.ColumnName.ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dc.ColumnName.ToString() }; RCBTableField.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void ConsultarFechas(int anio, int Mes, ref Sesion sesion, string SP, ref Telerik.Web.UI.RadComboBox RadComboBox) { try { //sesion.Id_Cd_Ver = Convert.ToInt32(item.Value); //sesion.Cd_Nombre = item.Text; CN_CatCalendario cn_catcalendario = new CN_CatCalendario(); Calendario calendario = new Calendario(); cn_catcalendario.ConsultaCalendarioActual(ref calendario, sesion); sesion.CalendarioIni = calendario.Cal_FechaIni; sesion.CalendarioFin = calendario.Cal_FechaFin; } catch (Exception ex) { throw ex; } }
public void FillModuleType(Telerik.Web.UI.RadComboBox RCBModuleType, string argClientCode) { RCBModuleType.Items.Clear(); foreach (DataRow dr in GetModuleType(argClientCode).Tables[0].Rows) { String itemText = dr["ModuleType"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ModuleType"].ToString().Trim() }; itemCollection.Attributes.Add("ModuleType", dr["ModuleType"].ToString()); RCBModuleType.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBTableStructure) { RCBTableStructure.Items.Clear(); foreach (DataRow dr in GetDBTableStructure().Tables[0].Rows) { String itemText = dr["TableName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["TableName"].ToString() }; itemCollection.Attributes.Add("TableName", dr["TableName"].ToString()); RCBTableStructure.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBSalesOrderDetailItemNo, string argClientCode, string argSODocCode) { RCBSalesOrderDetailItemNo.Items.Clear(); foreach (DataRow dr in GetSalesOrderDetailsItemNo(argSODocCode, argClientCode).Tables[0].Rows) { String itemText = dr["SOItemNo"].ToString().Trim(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["SOItemNo"].ToString().Trim() }; itemCollection.Attributes.Add("SOItemNo", dr["SOItemNo"].ToString().Trim()); RCBSalesOrderDetailItemNo.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCbCRLimitCheck, string argClientCode, int iIsDeleted) { RCbCRLimitCheck.Items.Clear(); foreach (DataRow dr in GetCRLimitCheck(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["CRLimitCheckType"].ToString().Trim() + " " + dr["CRLimitCheckDesc"].ToString().Trim(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["CRLimitCheckType"].ToString().Trim() }; itemCollection.Attributes.Add("CRLimitCheckType", dr["CRLimitCheckType"].ToString().Trim()); itemCollection.Attributes.Add("CRLimitCheckDesc", dr["CRLimitCheckDesc"].ToString().Trim()); RCbCRLimitCheck.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBFiledName, int iIsDeleted) { RCBFiledName.Items.Clear(); foreach (DataRow dr in GetFieldMaster(iIsDeleted).Tables[0].Rows) { String itemText = dr["FieldName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["FieldName"].ToString() }; itemCollection.Attributes.Add("FieldName", dr["FieldName"].ToString()); RCBFiledName.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBShippingPoint, string argPlantCode, string argClientCode) { RCBShippingPoint.Items.Clear(); foreach (DataRow dr in GetPlant_ShippingPoint(argPlantCode, argClientCode).Tables[0].Rows) { String itemText = dr["ShippingPointCode"].ToString() + " " + dr["ShippingPointName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ShippingPointCode"].ToString().Trim() }; itemCollection.Attributes.Add("ShippingPointCode", dr["ShippingPointCode"].ToString().Trim()); itemCollection.Attributes.Add("ShippingPointName", dr["ShippingPointName"].ToString()); RCBShippingPoint.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBDivision, string argClientCode, string argSalesOrganizationCode) { RCBDivision.Items.Clear(); foreach (DataRow dr in GetDivision4SalesOrg(argSalesOrganizationCode, argClientCode).Tables[0].Rows) { String itemText = dr["DivisionCode"].ToString().Trim() + " " + dr["DivisionName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["DivisionCode"].ToString().Trim() }; itemCollection.Attributes.Add("DivisionCode", dr["DivisionCode"].ToString().Trim()); itemCollection.Attributes.Add("DivisionName", dr["DivisionName"].ToString()); RCBDivision.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBItemType, int iIsDeleted) { RCBItemType.Items.Clear(); foreach (DataRow dr in GetItemType().Tables[0].Rows) { String itemText = dr["ItemTypeCode"].ToString().Trim() + " " + dr["ItemTypeDesc"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ItemTypeCode"].ToString().Trim() }; itemCollection.Attributes.Add("ItemTypeCode", dr["ItemTypeCode"].ToString().Trim()); itemCollection.Attributes.Add("ItemTypeDesc", dr["ItemTypeDesc"].ToString().Trim()); RCBItemType.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void LlenaCombo(Int32 Id1, Int32 Id2, string conexion, string SP, ref Telerik.Web.UI.RadComboBox RadComboBox, params bool[] claveString) { try { System.Collections.Generic.List <Comun> Lista = new System.Collections.Generic.List <Comun>(); CapaDatos.CD__Comun claseCapaDatos = new CapaDatos.CD__Comun(); claseCapaDatos.LlenaCombo(Id1, Id2, SP, conexion, ref Lista, claveString); if (Lista.Count > 0) { RadComboBox.DataSource = Lista; if (claveString.Length > 0) { if (claveString[0]) { RadComboBox.DataValueField = "IdStr"; } else { RadComboBox.DataValueField = "Id"; } } else { RadComboBox.DataValueField = "Id"; } if (Lista.ToArray()[0].Relacion != "sin_relacion") { RadComboBox.DataTextField = "Relacion"; } else { RadComboBox.DataTextField = "Descripcion"; } RadComboBox.DataBind(); } } catch (Exception ex) { throw ex; } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBIndustryMaster, string argClientCode, int iIsDeleted) { RCBIndustryMaster.Items.Clear(); foreach (DataRow dr in GetIndustryMaster(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["IndustryName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["IndustryName"].ToString().Trim() }; itemCollection.Attributes.Add("IndustryName", dr["IndustryName"].ToString()); RCBIndustryMaster.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBAuthOrgRole, string argClientCode) { RCBAuthOrgRole.Items.Clear(); foreach (DataRow dr in GetAuthOrgRoleMaster(argClientCode).Tables[0].Rows) { String itemText = dr["AuthOrgcode"].ToString() + " " + dr["AuthOrgDesc"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["AuthOrgcode"].ToString() }; itemCollection.Attributes.Add("AuthOrgcode", dr["AuthOrgcode"].ToString()); itemCollection.Attributes.Add("AuthOrgDesc", dr["AuthOrgDesc"].ToString()); RCBAuthOrgRole.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBUpdateType, string argClientCode, int iIsDeleted) { RCBUpdateType.Items.Clear(); foreach (DataRow dr in GetCRContUpdateType(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["CRUpdateCode"].ToString() + " " + dr["UpdateType"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["CRUpdateCode"].ToString() }; itemCollection.Attributes.Add("CRUpdateCode", dr["CRUpdateCode"].ToString()); itemCollection.Attributes.Add("UpdateType", dr["UpdateType"].ToString()); RCBUpdateType.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBState, string argCountryCode, int iIsDeleted) { RCBState.Items.Clear(); foreach (DataRow dr in GetState(argCountryCode, iIsDeleted).Tables[0].Rows) { String itemText = dr["StateCode"].ToString() + " " + dr["StateName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["StateCode"].ToString().Trim() }; itemCollection.Attributes.Add("StateCode", dr["StateCode"].ToString()); itemCollection.Attributes.Add("StateName", dr["StateName"].ToString()); RCBState.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBMatMovement, string argItemCategory, string argClientCode, int iIsDeleted) { RCBMatMovement.Items.Clear(); foreach (DataRow dr in GetItemCategory_MatMovementType4Combo(argItemCategory, argClientCode).Tables[0].Rows) { String itemText = dr["MatMovementCode"].ToString() + " " + dr["MatMovementDesc"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["MatMovementCode"].ToString().Trim() }; itemCollection.Attributes.Add("MatMovementCode", dr["MatMovementCode"].ToString().Trim()); itemCollection.Attributes.Add("MatMovementDesc", dr["MatMovementDesc"].ToString()); RCBMatMovement.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBOrderReason, string argClientCode) { RCBOrderReason.Items.Clear(); foreach (DataRow dr in GetOrderReason(argClientCode).Tables[0].Rows) { String itemText = dr["ReasonCode"].ToString() + " " + dr["ReasonDesc"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ReasonCode"].ToString().Trim() }; itemCollection.Attributes.Add("ReasonCode", dr["ReasonCode"].ToString()); itemCollection.Attributes.Add("ReasonDesc", dr["ReasonDesc"].ToString()); RCBOrderReason.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBBusinessArea, int iIsDeleted, string argClientCode) { RCBBusinessArea.Items.Clear(); foreach (DataRow dr in GetBusinessArea(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["BusinessAreaCode"].ToString() + " " + dr["BusinessAreaName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["BusinessAreaCode"].ToString().Trim() }; itemCollection.Attributes.Add("BusinessAreaCode", dr["BusinessAreaCode"].ToString()); itemCollection.Attributes.Add("BusinessAreaName", dr["BusinessAreaName"].ToString()); RCBBusinessArea.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBGLAccountGroup, string argChartACCode, string argClientCode, int iIsDeleted) { RCBGLAccountGroup.Items.Clear(); foreach (DataRow dr in GetGLAccountGroups(argChartACCode, iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["ActGroup"].ToString() + " " + dr["GroupName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ActGroup"].ToString() }; itemCollection.Attributes.Add("ActGroup", dr["ActGroup"].ToString()); itemCollection.Attributes.Add("GroupName", dr["GroupName"].ToString()); RCBGLAccountGroup.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBClient, int iIsDeleted) { RCBClient.Items.Clear(); foreach (DataRow dr in GetClient(iIsDeleted).Tables[0].Rows) { String itemText = dr["ClientCode"].ToString() + " " + dr["ClientName"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["ClientCode"].ToString() }; itemCollection.Attributes.Add("ClientCode", dr["ClientCode"].ToString()); itemCollection.Attributes.Add("ClientName", dr["ClientName"].ToString()); RCBClient.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBVendorGroup, string argClientCode, int iIsDeleted) { RCBVendorGroup.Items.Clear(); foreach (DataRow dr in GetVendorGroup(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["VendGroupCode"].ToString() + " " + dr["VendGroupDesc"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["VendGroupCode"].ToString() }; itemCollection.Attributes.Add("VendGroupCode", dr["VendGroupCode"].ToString()); itemCollection.Attributes.Add("VendGroupDesc", dr["VendGroupDesc"].ToString()); RCBVendorGroup.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBDlvPriority, string argClientCode, int iIsDeleted) { RCBDlvPriority.Items.Clear(); foreach (DataRow dr in GetDeliveryPriority(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["DlvPriorityCode"].ToString() + " " + dr["DlvPriorityDesc"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["DlvPriorityCode"].ToString().Trim() }; itemCollection.Attributes.Add("DlvPriorityCode", dr["DlvPriorityCode"].ToString()); itemCollection.Attributes.Add("DlvPriorityDesc", dr["DlvPriorityDesc"].ToString()); RCBDlvPriority.Items.Add(itemCollection); itemCollection.DataBind(); } }
public void FillCombobox(Telerik.Web.UI.RadComboBox RCBGLAccountCategory, string argClientCode, int iIsDeleted) { RCBGLAccountCategory.Items.Clear(); foreach (DataRow dr in GetAccountCategory(iIsDeleted, argClientCode).Tables[0].Rows) { String itemText = dr["AccCategoryCode"].ToString() + " " + dr["CategoryDesc"].ToString(); var itemCollection = new RadComboBoxItem { Text = itemText, Value = dr["AccCategoryCode"].ToString() }; itemCollection.Attributes.Add("AccCategoryCode", dr["AccCategoryCode"].ToString()); itemCollection.Attributes.Add("CategoryDesc", dr["CategoryDesc"].ToString()); RCBGLAccountCategory.Items.Add(itemCollection); itemCollection.DataBind(); } }
private HtmlGenericControl CreateHeaderDiv(Criterion criterion) { var containerDiv = new HtmlGenericControl("div"); var headerDiv = new HtmlGenericControl("div"); headerDiv.Attributes["class"] = "criteriaHeaderDiv"; var headerDivLbl = new HtmlGenericControl("div"); headerDivLbl.Attributes["class"] = "left"; var headerDivExpand = new HtmlGenericControl("div"); headerDivExpand.Attributes["class"] = "right"; var adjustedID = StripString(criterion.Key); headerDivExpand.ID = "expand_" + adjustedID; headerDivExpand.Style.Add("overflow", "hidden"); var requiredAsterik = ""; // Add tooltip if (!criterion.Locked && (criterion.UIType != UIType.None)) { var tooltip = new RadToolTip { Height = 55, Width = 205, TargetControlID = headerDivExpand.ID, Position = ToolTipPosition.MiddleRight, RelativeTo = ToolTipRelativeDisplay.Element, HideEvent = ToolTipHideEvent.Default, AutoCloseDelay = 20000, Skin = "Black", ShowEvent = ToolTipShowEvent.OnClick, EnableShadow = true }; var contentChunk = new HtmlGenericControl("div"); contentChunk.Style.Add("position", "relative"); if (criterion.IsRequired) //BJC - 6/11/2012: If this criterion object is required { requiredFields.Value += criterion.Key + ","; //Add Key to the requiredFields hidden input value. requiredAsterik = "<span style=\"font-weight:bold;color:#F00;\">*</span>"; } // Add appropriate control to tooltip switch (criterion.UIType) { case UIType.DropDownList: var cmb = CreateDropDownList(criterion, adjustedID); if (criterion.Object != null && criterion.ReportStringVal != null) { var selectedItemIndex = cmb.FindItemIndexByValue(adjustedID + "_" + criterion.ReportStringVal, true); if (selectedItemIndex > 0) cmb.SelectedIndex = selectedItemIndex; if (requiredFieldsSelected.Value.IndexOf(criterion.Key) == -1) { requiredFieldsSelected.Value += criterion.Key + ","; } } contentChunk.Controls.Add(new HtmlGenericControl("div") { InnerText = criterion.Header }); contentChunk.Controls.Add(cmb); tooltip.Attributes["dropDownListID"] = cmb.ID; tooltip.OnClientShow = "onClientShowToolTipDropDownList"; break; //case UIType.RadioButton: // { // var radioButtons = new RadButton() // { // ID = "RadRadioButtonCriteriaRadioButtonList", // GroupName = criterion.Key, // ToggleType = ButtonToggleType.Radio, // //AutoPostBack = false, // //OnClientToggleStateChanged = "OnClientToggleStateChanged" // }; // if (criterion.DataSource == null) // { // radioButtons.ToggleStates.Add(new RadButtonToggleState("No data supplied", string.Format(adjustedID + "_" + "0"))); // } // else // { // radioButtons.ToggleStates.Add(new RadButtonToggleState("All", string.Format(adjustedID + "_" + "0"))); // foreach (DataRow row in ((DataTable)criterion.DataSource).Rows) // { // var rbItem = new RadButtonToggleState(row[criterion.DataTextField].ToString(), // adjustedID + "_" + // row[criterion.DataValueField]); // radioButtons.ToggleStates.Add(rbItem); // } // } // contentChunk.Controls.Add(new System.Web.UI.HtmlControls.HtmlGenericControl("div") { InnerText = criterion.Header }); // contentChunk.Controls.Add(radioButtons); // break; // } case UIType.CheckBoxList: { tooltip.Width = (criterion.ChildDataSource != null) ? 450 : 205; var listBox = this.CreateCheckBoxList(criterion, adjustedID); tooltip.Attributes.Add("lstBoxID", listBox.ClientID); tooltip.OnClientShow = "setListBoxMaxHeight"; if (criterion.Object != null && criterion.ReportStringVal != null) { if (requiredFieldsSelected.Value.IndexOf(criterion.Key) == -1) { requiredFieldsSelected.Value += criterion.Key + ","; } } contentChunk.Controls.Add(new HtmlGenericControl("div") { InnerText = criterion.Header }); contentChunk.Controls.Add(listBox); if (!string.IsNullOrEmpty(criterion.ChildHeader)) { tooltip.OnClientShow = "TooltipOnClientShow_DisplayChildCheckboxItems"; tooltip.Attributes["ParentListID"] = "RadCombobBoxCriteriaCheckBoxList"; tooltip.Attributes["ChildListID"] = "RadCombobBoxCriteriaCheckBoxList2"; listBox.Attributes.Add("ChildCheckBoxList", "RadCombobBoxCriteriaCheckBoxList2"); var listBox2 = new RadListBox { ID = "RadCombobBoxCriteriaCheckBoxList2", AutoPostBack = false, CheckBoxes = true, Skin = "Vista", OnClientItemChecked = "onItemChecked" }; foreach (DataRow row in ((DataTable)criterion.ChildDataSource).Rows) { var listBoxValue = string.Format("{0}_{1}", adjustedID, StripString(row[criterion.ChildDataValueField].ToString())); var listBoxItem = new RadListBoxItem(row[criterion.ChildDataTextField].ToString(), listBoxValue); listBoxItem.Attributes["parentValue"] = string.Format("{0}_{1}", adjustedID, StripString(row[criterion.ChildDataParentField].ToString())); listBoxItem.Attributes["checkBoxID"] = string.Format("{0}_RadCombobBoxCriteriaCheckBoxList2_CheckBox", listBoxValue); Criterion tempCriterion = null; foreach (Criterion c in Criteria.CriterionList) { if (c.Key == listBoxValue) { tempCriterion = c; break; } } if (tempCriterion != null) { listBoxItem.Checked = !tempCriterion.Empty; } listBox2.Items.Add(listBoxItem); } contentChunk.Controls.Add(new HtmlGenericControl("span") { InnerText = criterion.ChildHeader }); contentChunk.Controls.Add(listBox2); } break; } case UIType.TextBox: { var textBox = CreateTextBox(criterion, adjustedID); if (criterion.Object != null && criterion.ReportStringVal != null) { if (requiredFieldsSelected.Value.IndexOf(criterion.Key) == -1) { requiredFieldsSelected.Value += criterion.Key + ","; } } contentChunk.Controls.Add(new HtmlGenericControl("div") { InnerText = criterion.Header }); contentChunk.Controls.Add(textBox); tooltip.OnClientShow = "onClientShowToolTipTextBox"; tooltip.Attributes["textBoxID"] = textBox.ID; break; } case UIType.DatePicker: { tooltip.Width = 330; var startCriterion = Criteria.CriterionList.Find(c => c.Header == criterion.Header && c.IsHeader == false && c.Key.Contains("Start")); var endCriterion = Criteria.CriterionList.Find(c => c.Header == criterion.Header && c.IsHeader == false && c.Key.Contains("End")); var wrapperDiv = CreateDatePicker(adjustedID, startCriterion, endCriterion); if (criterion.Object != null && criterion.ReportStringVal != null) { if (requiredFieldsSelected.Value.IndexOf(criterion.Key) == -1) { requiredFieldsSelected.Value += criterion.Key + ","; } } contentChunk.Controls.Add(new HtmlGenericControl("div") { InnerText = criterion.Header }); contentChunk.Controls.Add(wrapperDiv); break; } case UIType.AssessmentTextSearch: { tooltip.Width = 400; var wrapperDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div"); wrapperDiv.Style.Add("width", "350px"); var textBox = new RadTextBox { ID = "RadTextBoxAssessmentTextSearch", AutoPostBack = false, Skin = "Vista" }; textBox.ClientEvents.OnBlur = "onInputBlur"; textBox.Attributes["updateMessageHeader"] = adjustedID; textBox.Attributes["comboBoxDivID"] = "cmbBoxDiv"; //ADD DIV TO contentChunk var textBoxDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div") { ID = "textBoxDiv" }; textBoxDiv.Controls.Add(textBox); var textSearchCmb = new Telerik.Web.UI.RadComboBox { ID = "RadComboBoxAssessmentTextSearch", AutoPostBack = false, MarkFirstMatch = true, AllowCustomText = false, ZIndex = 8005, OnClientSelectedIndexChanged = "onSelectedIndexChanged", Skin = "Vista" }; textSearchCmb.Attributes["textBoxDivID"] = "textBoxDiv"; if (criterion.Object != null) { var textSearchObjectArray = criterion.Object.ToString().Split(':'); textBox.Text = textSearchObjectArray[1].Trim(); var selectedItemIndex = textSearchCmb.FindItemIndexByText(textSearchObjectArray[0].Trim(), true); textSearchCmb.SelectedIndex = selectedItemIndex; if (requiredFieldsSelected.Value.IndexOf(criterion.Key) == -1) { requiredFieldsSelected.Value += criterion.Key + ","; } } var textSearchCmbDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div") { ID = "cmbBoxDiv" }; textSearchCmbDiv.Controls.Add(textSearchCmb); if (criterion.DataSource == null) { textSearchCmb.Items.Add(new RadComboBoxItem("No data supplied", adjustedID + "_" + "0")); } else { foreach (DataRow row in ((DataTable)criterion.DataSource).Rows) { textSearchCmb.Items.Add(new RadComboBoxItem(row[criterion.DataTextField].ToString(), adjustedID + "_" + row[criterion.DataValueField])); } } contentChunk.Controls.Add(new System.Web.UI.HtmlControls.HtmlGenericControl("div") { InnerText = criterion.Header }); var wrapperDivLeft = new System.Web.UI.HtmlControls.HtmlGenericControl("div"); wrapperDivLeft.Style.Add("float", "left"); wrapperDivLeft.Style.Add("width", "149px"); wrapperDivLeft.Controls.Add(textBoxDiv); var wrapperDivRight = new System.Web.UI.HtmlControls.HtmlGenericControl("div"); wrapperDivRight.Style.Add("float", "right"); wrapperDivRight.Style.Add("width", "149px"); wrapperDivRight.Controls.Add(textSearchCmbDiv); wrapperDiv.Controls.Add(wrapperDivLeft); wrapperDiv.Controls.Add(wrapperDivRight); contentChunk.Controls.Add(wrapperDiv); break; } case UIType.Demographics: { tooltip.Width = 390; contentChunk.Controls.Add(new HtmlGenericControl("div") { InnerText = criterion.Header }); contentChunk.Controls.Add(CreateDemographics(criterion, adjustedID)); break; } case UIType.RTI: { contentChunk.Controls.Add(new HtmlGenericControl("div") { InnerText = criterion.Header }); contentChunk.Controls.Add(CreateRTI(criterion, adjustedID)); break; } } tooltip.Controls.Add(contentChunk); headerDiv.Controls.Add(tooltip); } if (criterion.Locked == false) { headerDivExpand.Controls.Add(new Image { ImageUrl = "~/Images/commands/expand_bubble.png", Width = 16, Height = 16 }); } else if (FirstTimeLoaded) { criterion.ReportStringVal = criterion.DefaultValue; } headerDivLbl.InnerHtml = criterion.Header + ":" + requiredAsterik; headerDiv.Controls.Add(headerDivLbl); headerDiv.Controls.Add(headerDivExpand); var updateMessageDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div"); updateMessageDiv.Attributes["class"] = "criteriaUpdateMessageDiv"; updateMessageDiv.Attributes["id"] = adjustedID + "_updateMessage"; containerDiv.Controls.Add(headerDiv); containerDiv.Controls.Add(updateMessageDiv); return containerDiv; }