public override object Clone()
        {
            DataGridViewAutoFilterTextBoxColumn column1 = (DataGridViewAutoFilterTextBoxColumn)base.Clone();

            column1.DataCellType         = this._dataFormater;
            column1.DataCellTypeFormater = this.DataCellTypeFormater;
            column1.CellTemplate         = new DataGridViewAutoFilterTextBoxCell();
            return(column1);
        }
 protected override object GetFormattedValue(object value, int rowIndex, ref DataGridViewCellStyle cellStyle, System.ComponentModel.TypeConverter valueTypeConverter, System.ComponentModel.TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context)
 {
     if (value != null)
     {
         DataGridViewAutoFilterTextBoxColumn column = this.OwningColumn as DataGridViewAutoFilterTextBoxColumn;
         if (column != null)
         {
             if (column.DataCellType == DataCellType.CharToDate)
             {
                 return(TryParse.DateToStrByChar(value));
             }
             else if (column.DataCellType == DataCellType.DateToChar && value.GetType().GetUnderlyingType() == typeof(DateTime) && !string.IsNullOrEmpty(column.DataCellTypeFormater))
             {
                 return(TryParse.DateToStr(value, column.DataCellTypeFormater));
             }
         }
     }
     return(base.GetFormattedValue(value, rowIndex, ref cellStyle, valueTypeConverter, formattedValueTypeConverter, context));
 }