/// <summary>
        /// Constructor
        /// </summary>
        public DataGridViewDateTimeInputColumn()
        {
            CellTemplate = new DataGridViewDateTimeInputCell();

            _DateTimeInput = new DateTimeInput();

            _DateTimeInput.BackgroundStyle.Class = ElementStyleClassKeys.DataGridViewDateTimeBorderKey;
            _DateTimeInput.Visible = false;
        }
 public string GetFormData(DateTimeInput obj, string LogObjName)
 {
     if (string.IsNullOrEmpty(obj.Text))
         return "";
     else
     {
         string str = obj.Value.ToShortDateString();
         _prlp.SetAfterSaveText(LogObjName, str);
         return str;
     }
 }
        /// <summary>
        /// DateTimeInput 用
        /// </summary>
        /// <param name="strValue"></param>
        /// <param name="obj"></param>
        /// <param name="logObjName"></param>
        /// <returns></returns>
        public DateTimeInput SetFormData(string strValue, DateTimeInput obj, string logObjName)
        {
            DateTime dt;

            if (DateTime.TryParse(strValue, out dt))
            {
                obj.Value = dt;
                _prlp.SetBeforeSaveText(logObjName, strValue);
            }
            else
            {
                obj.IsEmpty = true;
                _prlp.SetBeforeSaveText(logObjName, "");
            }

            return obj;
        }
        /// <summary>
        /// DrawText
        /// </summary>
        /// <param name="di"></param>
        /// <param name="r"></param>
        /// <param name="g"></param>
        private void DrawText(DateTimeInput di, Rectangle r, Graphics g)
        {
            r.Inflate(-2, 0);

            eTextFormat tf = eTextFormat.VerticalCenter;

            switch (di.InputHorizontalAlignment)
            {
                case eHorizontalAlignment.Center:
                    tf |= eTextFormat.HorizontalCenter;
                    break;

                case eHorizontalAlignment.Right:
                    tf |= eTextFormat.Right;
                    break;
            }

            TextDrawing.DrawString(g, di.Text, di.Font, di.ForeColor, r, tf);
        }
        /// <summary>
        /// DrawControl
        /// </summary>
        /// <param name="di"></param>
        /// <param name="r"></param>
        /// <param name="g"></param>
        private void DrawControl(DateTimeInput di, Rectangle r, Graphics g)
        {
            GraphicsState gs = g.Save();

            try
            {
                g.TranslateTransform(r.X, r.Y);

                di.Width = r.Width;
                di.InternalPaint(new PaintEventArgs(g, Rectangle.Empty));
            }
            finally
            {
                g.Restore(gs);
            }
        }