protected void cbCycles_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e) { e.Item.Attributes.Add("FromDate", ((DataRowView)e.Item.DataItem)["FromDate"].ToString()); e.Item.Attributes.Add("ToDate", ((DataRowView)e.Item.DataItem)["ToDate"].ToString()); //e.Item.Text = ((DataRowView)e.Item.DataItem)["CycleName"].ToString(); //e.Item.Value = ((DataRowView)e.Item.DataItem)["CycleID"].ToString(); }
protected void ddlTimeZone_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e) { Telerik.Web.UI.RadComboBoxItem rdCm = e.Item; if (rdCm.Text == "Separator") { rdCm.Text = "----------------------------------------------"; rdCm.IsSeparator = true; } }
/// <summary> /// Handles the ItemDataBound event of the ddlDiscountPlan control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Telerik.Web.UI.RadComboBoxItemEventArgs"/> instance containing the event data.</param> protected void ddlDiscountPlan_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e) { try { e.Item.Attributes.Clear(); DiscountPlan plan = e.Item.DataItem as DiscountPlan; e.Item.Text = plan.Name; e.Item.Attributes.Add("rate", plan.Rate.ToString("{0:N}")); e.Item.Attributes.Add("startdate", plan.StartDate.ToString("dd-MMM-yyyy")); e.Item.Attributes.Add("enddate", plan.EndDate.HasValue ? plan.EndDate.Value.ToString("dd-MMM-yyyy") : "00-000-0000"); //plan.EndDate.ToString("dd-MMM-yyyy")); } catch (Exception ex) { this.showErrorMessage(ref ex); } }
protected void ddlNotifyOther_ItemChecked(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e) { FillEmailAddressLabels(); ddlNotifyOther.OpenDropDownOnLoad = true; }
void cboOrder_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e) { e.Item.Text = ((DataRowView)e.Item.DataItem)["OrderID"].ToString(); }
void cboDefaultNominalCode_ItemDataBound(object o, Telerik.Web.UI.RadComboBoxItemEventArgs e) { e.Item.Text = (e.Item.DataItem as DataRowView)["Description"].ToString(); }