Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

ColumnProperty.cs

namespace Nop.Web.Framework.Models.DataTables;

/// 
/// Represent DataTables column property
/// 
public partial class ColumnProperty
{
    #region Ctor

    /// 
    /// Initializes a new instance of the ColumnProperty class
    /// 
    /// The data source for the column from the rows data object
    public ColumnProperty(string data)
    {
        Data = data;
        //set default values
        Visible = true;
        Encode = true;
    }

    #endregion

    #region Properties

    /// 
    /// Set the data source for the column from the rows data object / array.
    /// See also "https://datatables.net/reference/option/columns.data"
    /// 
    public string Data { get; set; }

    /// 
    /// Set the column title.
    /// 
    public string Title { get; set; }

    /// 
    /// Render (process) the data for use in the table. This property will modify the data that is used by DataTables for various operations.
    /// 
    public IRender Render { get; set; }

    /// 
    /// Column width assignment. This parameter can be used to define the width of a column, and may take any CSS value (3em, 20px etc).
    /// 
    public string Width { get; set; }

    /// 
    /// Column autowidth assignment. This can be disabled as an optimisation (it takes a finite amount of time to calculate the widths) if the tables widths are passed in using "width".
    /// 
    public bool AutoWidth { get; set; }

    /// 
    /// Indicate whether the column is master check box
    /// 
    public bool IsMasterCheckBox { get; set; }

    /// 
    /// Class to assign to each cell in the column.
    /// 
    public string ClassName { get; set; }

    /// 
    /// Enable or disable the display of this column.
    /// 
    public bool Visible { get; set; }

    /// 
    /// Enable or disable filtering on the data in this column.
    /// 
    public bool Searchable { get; set; }

    /// 
    /// Enable or disable editing on the data in this column.
    /// 
    public bool Editable { get; set; }

    /// 
    /// Data column type
    /// 
    public EditType EditType { get; set; }

    /// 
    /// Enable or disable encode on the data in this column.
    /// 
    public bool Encode { get; set; }

    #endregion
}