using System;
using System.Collections.Generic;
using System.Threading;
using System.Web.UI;

using DevExpress.Web.ASPxClasses;

namespace Host
{
    public partial class DX : Page
    {
        protected void ASPxComboBox2_Callback(object sender, CallbackEventArgsBase e)
        {
            Thread.Sleep(1000);

            this.ASPxComboBox2.Items.Clear();
            this.ASPxComboBox2.Items.Add(e.Parameter + " A", e.Parameter + " A");
            this.ASPxComboBox2.Items.Add(e.Parameter + " B", e.Parameter + " B");
            this.ASPxComboBox2.Items.Add(e.Parameter + " C", e.Parameter + " C");
        }

        protected void ASPxDataView1_CustomCallback(object sender, CallbackEventArgsBase e)
        {
            Thread.Sleep(1000);

            this.ASPxDataView1.Items.Clear();

            var d = new List<DataItem>();
            for (int i = 0; i < 10; i++)
            {
                d.Add(new DataItem { A = i + " test ", B = e.Parameter });
            }

            this.ASPxDataView1.DataSource = d;
            this.ASPxDataView1.DataBind();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        public class DataItem
        {
            public string A { get; set; }

            public string B { get; set; }
        }
    }
}