protected void TaxGroup_Init(object sender, EventArgs e)
        {
            ASPxComboBox comboBox = (ASPxComboBox)sender;

            comboBox.DataSource = POClass.TaxGroupTable();

            ListBoxColumn l_value = new ListBoxColumn();

            l_value.FieldName = "TaxGroup";
            comboBox.Columns.Add(l_value);

            comboBox.ValueField = "TaxGroup";
            comboBox.TextField  = "TaxGroup";
            comboBox.DataBind();
        }
Ejemplo n.º 2
0
        protected void TaxGroup_Init(object sender, EventArgs e)
        {
            ASPxComboBox combo = (ASPxComboBox)sender;

            combo.DataSource = POClass.TaxGroupTable();

            ListBoxColumn l_value = new ListBoxColumn();

            l_value.FieldName = "TaxGroup";
            combo.Columns.Add(l_value);

            combo.ValueField = "TaxGroup";
            combo.TextField  = "TaxGroup";
            combo.DataBind();

            GridViewEditItemTemplateContainer container = combo.NamingContainer as GridViewEditItemTemplateContainer;

            if (!container.Grid.IsNewRowEditing)
            {
                combo.Value = DataBinder.Eval(container.DataItem, "TaxGroup").ToString();
            }
        }