Пример #1
0
        private void WarehouseCombo_Data()
        {
            ASPxComboBox combo = WarehouseCombo as ASPxComboBox;

            combo.Columns.Clear();

            combo.Value      = "";
            combo.DataSource = POClass.InventSiteWarehouseTable(SiteCombo.Text.ToString());

            ListBoxColumn l_value = new ListBoxColumn();

            l_value.FieldName = "warehouse";
            l_value.Caption   = "Warehouse";
            combo.Columns.Add(l_value);

            ListBoxColumn l_text = new ListBoxColumn();

            l_text.FieldName = "NAME";
            l_text.Caption   = "Name";
            combo.Columns.Add(l_text);

            combo.ItemStyle.Wrap = DevExpress.Utils.DefaultBoolean.True;
            combo.TextField      = "NAME";
            combo.ValueField     = "warehouse";
            combo.DataBind();
            combo.ClientEnabled = true;
        }
        protected void WarehouseCallback_Callback(object sender, CallbackEventArgsBase e)
        {
            Warehouse.Value      = "";
            Warehouse.DataSource = POClass.InventSiteWarehouseTable(Site.Text.ToString());

            ListBoxColumn l_value = new ListBoxColumn();

            l_value.FieldName = "warehouse";
            l_value.Caption   = "Warehouse";
            Warehouse.Columns.Add(l_value);

            ListBoxColumn l_text = new ListBoxColumn();

            l_text.FieldName = "NAME";
            l_text.Caption   = "Name";
            l_text.Width     = 200;
            Warehouse.Columns.Add(l_text);

            Warehouse.ItemStyle.Wrap = DevExpress.Utils.DefaultBoolean.True;
            Warehouse.TextField      = "NAME";
            Warehouse.ValueField     = "warehouse";
            Warehouse.DataBind();
            Warehouse.ClientEnabled = true;
        }