protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { C1ComboBoxItem item = new C1ComboBoxItem("Today", DateTime.Now.ToShortDateString()); this.InputDateExtender1.ComboItems.Add(item); } }
protected void C1ComboBox1_ItemPopulate(object sender, C1ComboBoxItemPopulateEventArgs args) { DataTable dt = GetDataTable("The new lang. X"); if (args.RequestedItemCount >= dt.Rows.Count) { args.EndRequest = true; } int curOffset = args.RequestedItemCount; int endOffset = Math.Min(curOffset + 5, dt.Rows.Count); for (int i = curOffset; i < endOffset; i++) { C1ComboBoxItem item = new C1ComboBoxItem(); item.Text = dt.Rows[i]["Text"].ToString(); item.Value = dt.Rows[i]["Value"].ToString(); item.Selected = (bool)dt.Rows[i]["Selected"]; this.C1ComboBox1.Items.Add(item); } }