示例#1
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            //Page.RegisterRequiresControlState(this);
            ods              = new ObjectDataSource();
            ods.ID           = "odsNameAffix";
            ods.TypeName     = "iSabaya.NameAffix";
            ods.SelectMethod = "List";
            ods.Selecting   += new ObjectDataSourceSelectingEventHandler(ods_Selecting);
            ods.SelectParameters.Add(new Parameter("context", TypeCode.Object));
            if (IsSuffix)
            {
                ods.SelectParameters.Add(new Parameter("isSuffix", TypeCode.Boolean));
            }

            cbo    = new ASPxComboBox();
            cbo.ID = this.ClientID + "cbo";
            //cbo.DataSourceID = ods.UniqueID;
            //cbo.TextField = "Affix";
            //cbo.ValueField = "AffixID";
            cbo.ValueType                = typeof(int);
            cbo.DataBinding             += new EventHandler(cbo_DataBinding);
            cbo.Width                    = Width;
            cbo.AnimationType            = DevExpress.Web.ASPxClasses.AnimationType.None;
            cbo.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;

            mlsOther       = new MLSControl();
            mlsOther.ID    = this.ClientID + "mlsOther";
            mlsOther.Width = Width;

            tbControl = new Table()
            {
                CellPadding = 0, CellSpacing = 0
            };
            TableRow row = new TableRow();

            row.Cells.Add(new TableCell()
            {
                HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Left,
                VerticalAlign   = System.Web.UI.WebControls.VerticalAlign.Top
            });
            row.Cells.Add(new TableCell()
            {
                ID = "tdOther",
                HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Left,
                VerticalAlign   = System.Web.UI.WebControls.VerticalAlign.Top
            });
            tbControl.Rows.Add(row);
            tbControl.Rows[0].Cells[1].Attributes.Add("style", "padding-left:2px;");
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            hddValueTypes    = new HiddenField();
            hddValueTypes.ID = this.ClientID + "hdd";

            cbo              = new ASPxComboBox();
            cbo.ID           = this.ClientID + "cbo";
            cbo.ValueType    = typeof(int);
            cbo.DataBinding += new EventHandler(cbo_DataBinding);
            cbo.Width        = Width;
            cbo.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
            cbo.EnableAnimation          = false;

            mlsOther       = new MLSControl();
            mlsOther.ID    = this.ClientID + "mlsOther";
            mlsOther.Width = Width;

            tbControl = new Table()
            {
                CellPadding = 0, CellSpacing = 0
            };
            TableRow row = new TableRow();

            row.Cells.Add(new TableCell()
            {
                HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Left,
                VerticalAlign   = System.Web.UI.WebControls.VerticalAlign.Top
            });
            row.Cells.Add(new TableCell()
            {
                ID = "tdOther",
                HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Left,
                VerticalAlign   = System.Web.UI.WebControls.VerticalAlign.Top
            });
            tbControl.Rows.Add(row);
            tbControl.Rows[0].Cells[1].Attributes.Add("style", "padding-left:2px;display:none");
        }