예제 #1
0
 protected DataColumnView(DataColumn column, DataColumnViewInfo info)
 {
     Column         = column;
     IsVisible      = info.IsVisible;
     Format         = info.Format;
     FormatProvider = info.FormatProvider;
 }
예제 #2
0
        public DataColumnView CreateDataColumnViewFromInfo(DataColumnViewInfo info)
        {
            if (info == null)
            {
                throw new ArgumentNullException(nameof(info));
            }

            DataColumn column = table.Columns[info.ColumnId];

            var columnView = column.CreateView(info);

            if (columnView.FormatProvider == null)
            {
                columnView.FormatProvider = formatProviderSource.GetFormatProvider(column.DataType);
                columnView.Format         = formatProviderSource.GetFormat(columnView.FormatProvider, columnView.Format);
            }

            return(columnView);
        }
예제 #3
0
 protected abstract DataColumnView CreateViewCore(DataColumnViewInfo info);
예제 #4
0
 public DataColumnView CreateView(DataColumnViewInfo info)
 {
     return(CreateViewCore(info));
 }