示例#1
0
        /// <summary>
        /// Creates the date column.
        /// </summary>
        /// <param name="prop">The prop.</param>
        /// <param name="dataItem">The data item.</param>
        /// <param name="column">The column.</param>
        /// <returns></returns>
        private TableCell CreateDateColumn(PropertyDescriptor prop, object dataItem, DateColumn column)
        {
            TableCell cell = new TableCell()
            {
                Text = String.Format(column.DateFormatString, prop.GetValue(dataItem).ToString())
            };

            if (column.Width.HasValue)
            {
                cell.Width = column.Width.Value;
            }

            return(cell);
        }
示例#2
0
        /// <summary>
        /// Creates the date column.
        /// </summary>
        /// <param name="prop">The prop.</param>
        /// <param name="dataItem">The data item.</param>
        /// <param name="column">The column.</param>
        /// <returns></returns>
        private TableCell CreateDateColumn(PropertyDescriptor prop, object dataItem, DateColumn column)
        {
            TableCell cell = new TableCell() { Text = String.Format(column.DateFormatString, prop.GetValue(dataItem).ToString()) };

            if (column.Width.HasValue)
            {
                cell.Width = column.Width.Value;
            }

            return cell;
        }