示例#1
0
        private void Edit_DataBinding(object sender, EventArgs e)
        {
            TimDateTime dtEdit = (TimDateTime)sender;
            object      value  = this.GetValue(dtEdit.NamingContainer);

            dtEdit.Text = this.FormatDataValue(value, this.HtmlEncode);
        }
示例#2
0
        protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowState rowState)
        {
            TimDateTime dtEdit = new TimDateTime();

            dtEdit.ID = "dt" + this.DataField;
            bool flag = base.Visible && base.ItemStyle.Width.Value > 2.0;

            if (flag)
            {
                dtEdit.Width = new Unit(base.ItemStyle.Width.Value - 2.0);
            }
            else
            {
                dtEdit.Width = base.ItemStyle.Width;
            }
            dtEdit.Enabled = this.Enabled;
            bool flag2 = this.TextChanged != null;

            if (flag2)
            {
                dtEdit.AutoPostBack = true;
                dtEdit.TextChanged += new EventHandler(this.TextChanged.Invoke);
            }
            dtEdit.DataBinding += new EventHandler(this.Edit_DataBinding);
            cell.Controls.Add(dtEdit);
        }