Ejemplo n.º 1
0
		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);
			}
		}
Ejemplo n.º 2
0
        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);
            }
        }