Esempio n. 1
0
 private void SetDisplayMember(EbPowerSelect powerselect)
 {
     if (this.DisplayMember != null)
     {
         powerselect.DisplayMember = new DVBaseColumn
         {
             EbSid  = "basecol_" + Guid.NewGuid().ToString("N"),
             Name   = this.DisplayMember.Name,
             Type   = this.DisplayMember.Type,
             sTitle = this.DisplayMember.Name,
             Data   = this.DisplayMember.ColumnIndex
         };
     }
 }
Esempio n. 2
0
        public override EbControl GetWebFormControl(int counter)
        {
            EbControl ctrl;
            string    ebSid = this.EbControlType + counter;

            if (IsSimpleSelect)
            {
                EbSimpleSelect simpleSelect = new EbSimpleSelect
                {
                    EbSid  = ebSid,
                    Name   = this.Name,
                    Margin = new UISides {
                        Top = 0, Bottom = 0, Left = 0, Right = 0
                    },
                    Label = this.Label
                };
                ctrl = simpleSelect;
                this.SetSimpleSelectOptions(simpleSelect);
            }
            else
            {
                EbPowerSelect powerselect = new EbPowerSelect
                {
                    EbSid        = ebSid,
                    DataSourceId = this.DataSourceRefId,
                    Name         = this.Name,
                    Margin       = new UISides {
                        Top = 0, Bottom = 0, Left = 0, Right = 0
                    },
                    Label = this.Label
                };
                ctrl = powerselect;
                this.SetDisplayMember(powerselect);
                this.SetValueMember(powerselect);
            }
            return(ctrl);
        }