Class JqGridColumnElementAttribute
Base class which specifies the options for jqGrid editable or searchable column element
Inheritance
Namespace: Lib.AspNetCore.Mvc.JqGrid.DataAnnotations
Assembly: Lib.AspNetCore.Mvc.JqGrid.DataAnnotations.dll
Syntax
public abstract class JqGridColumnElementAttribute : Attribute
Constructors
JqGridColumnElementAttribute()
Initializes a new instance of the JqGridColumnElementAttribute class.
Declaration
protected JqGridColumnElementAttribute()
Properties
AutocompleteAutoFocus
Gets or sets the value indicating if the first item will automatically be focused when the menu is shown.
Declaration
public bool AutocompleteAutoFocus { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AutocompleteDelay
Gets or sets the delay in milliseconds between when a keystroke occurs and when a search is performed.
Declaration
public int AutocompleteDelay { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
AutocompleteMinLength
Gets or sets the minimum number of characters a user must type before a search is performed.
Declaration
public int AutocompleteMinLength { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
BuildSelect
Gets or sets the function which will build the select element in case where the server response can not build it (requires DataUrl property to be set).
Declaration
public string BuildSelect { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CustomRule
Gets or sets if the value should be validated with custom function.
Declaration
public bool CustomRule { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
CustomRuleFunction
Gets or sets the name of custom validation function.
Declaration
public string CustomRuleFunction { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DataAction
Gets the name of the action method to get the AJAX data for the select element (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Select) or jQuery UI Autocomplete widget (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Autocomplete).
Declaration
public string DataAction { get; }
Property Value
Type | Description |
---|---|
System.String |
DataController
Gets the name of the controller to get the AJAX data for the select element (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Select) or jQuery UI Autocomplete widget (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Autocomplete).
Declaration
public string DataController { get; }
Property Value
Type | Description |
---|---|
System.String |
DataEvents
When overriden in delivered class, provides the list of events to apply to the element (jQuery UI widgets events can also be applied this way).
Declaration
public virtual ICollection<JqGridColumnDataEvent> DataEvents { get; }
Property Value
Type | Description |
---|---|
ICollection<JqGridColumnDataEvent> |
DataInit
Gets or sets the function which will be called once when the element is created. This property is ignored in case of jQuery UI widgets.
Declaration
public string DataInit { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DataRoute
Gets the name of the route to be used to generate URL to get the AJAX data for the select element (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Select) or jQuery UI Autocomplete widget (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Autocomplete).
Declaration
public string DataRoute { get; }
Property Value
Type | Description |
---|---|
System.String |
DatepickerAppendText
Gets or sets the text to display after each date field.
Declaration
public string DatepickerAppendText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DatepickerAutoSize
Gets or sets the value indicating if the input field should be automatically resize to accommodate dates in the current format.
Declaration
public bool DatepickerAutoSize { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DatepickerChangeMonth
Gets or sets the value indicating if the month should be rendered as a dropdown instead of text.
Declaration
public bool DatepickerChangeMonth { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DatepickerChangeYear
Gets or sets the value indicating if the year should be rendered as a dropdown instead of text.
Declaration
public bool DatepickerChangeYear { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DatepickerConstrainInput
Gets or sets the value indicating if the input field should constrained to characters allowed by the current format.
Declaration
public bool DatepickerConstrainInput { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DatePickerDateFormat
Gets or sets the format for parsed and displayed dates.
Declaration
public string DatePickerDateFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
If the value for this property is not provided, but there is a JqGridColumnFormatterAttribute with JqGridColumnPredefinedFormatters.Date formatter the helper will try to provide the value based on JqGridColumnFormatterAttribute.OutputFormat.
DatepickerFirstDay
Gets or sets the first day of the week: Sunday is 0, Monday is 1, etc.
Declaration
public int DatepickerFirstDay { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DatepickerGotoCurrent
Gets or sets the value indicating if the current day link moves to the currently selected date instead of today.
Declaration
public bool DatepickerGotoCurrent { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DatepickerMaxDate
Gets or sets the maximum selectable date.
Declaration
public string DatepickerMaxDate { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This string must be in the format defined by the DateFormat property, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today.
DatepickerMinDate
Gets or sets the minimum selectable date.
Declaration
public string DatepickerMinDate { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This string must be in the format defined by the DateFormat property, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today.
DatepickerNumberOfMonths
Gets or sets the number of months to show at once.
Declaration
public int DatepickerNumberOfMonths { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DatepickerSelectOtherMonths
Gets or sets the value indicating whether days in other months shown before or after the current month are selectable, this only applies if the ShowOtherMonths is set to true.
Declaration
public bool DatepickerSelectOtherMonths { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DatepickerShortYearCutoff
Gets or sets the cutoff year for determining the century for a date.
Declaration
public string DatepickerShortYearCutoff { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This string must be a relative number of years from the current year, e.g., "+3" or "-5".
DatepickerShowCurrentAtPos
Gets or sets the value which defines position to display the current month in, if the ShowOtherMonths is set to true.
Declaration
public int DatepickerShowCurrentAtPos { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DatepickerShowMonthAfterYear
Gets or sets the value indicating whether to show the month after the year in the header.
Declaration
public bool DatepickerShowMonthAfterYear { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DatepickerShowOtherMonths
Gets or sets the value indicating whether to display dates in other months (non-selectable) at the start or end of the current month, to make these days selectable set the SelectOtherMonths to true.
Declaration
public bool DatepickerShowOtherMonths { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DatepickerShowWeek
Gets or sets the value indicating whether to add column with the week of the year.
Declaration
public bool DatepickerShowWeek { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DatepickerStepMonths
Gets or sets the value which defines how many months to move when clicking the previous/next links.
Declaration
public int DatepickerStepMonths { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DatepickerYearRange
Gets or sets the range of years displayed in the year dropdown.
Declaration
public string DatepickerYearRange { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This string must be either relative to today's year ("-nn:+nn"), relative to the currently selected year ("c-nn:c+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn"). Note that this option only affects what appears in the dropdown, to restrict which dates may be selected use the MinDate and/or MaxDate.
DatepickerYearSuffix
Gets or sets the additional text to display after the year in the month headers.
Declaration
public string DatepickerYearSuffix { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DateRule
Gets or sets if the value should be valid date.
Declaration
public bool DateRule { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DefaultValue
Gets or sets the default value in the search input element.
Declaration
public string DefaultValue { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ElementOptions
Gets the options for jqGrid editable or searchable column element.
Declaration
protected abstract JqGridColumnElementOptions ElementOptions { get; }
Property Value
Type | Description |
---|---|
JqGridColumnElementOptions |
EmailRule
Gets or sets if the value should be valid email.
Declaration
public bool EmailRule { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
HtmlAttributes
Gets or sets a dictionary where keys should be valid attributes for the element.
Declaration
public virtual IDictionary<string, object> HtmlAttributes { get; }
Property Value
Type | Description |
---|---|
IDictionary<System.String, System.Object> |
Rules
Gets the rules for jqGrid editable or searchable column
Declaration
public JqGridColumnRules Rules { get; }
Property Value
Type | Description |
---|---|
JqGridColumnRules |
SpinnerCulture
Gets or sets the culture to use for parsing and formatting the value when Globalize plugin is included.
Declaration
public string SpinnerCulture { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SpinnerDownIcon
Gets or sets the icon class (form UI theme icons) for down button.
Declaration
public string SpinnerDownIcon { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SpinnerIncremental
Gets or sets value controlling the number of steps taken when holding down a spin button.
Declaration
public bool SpinnerIncremental { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
SpinnerMax
Gets or sets maximum allowed value.
Declaration
public int? SpinnerMax { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
SpinnerMin
Gets or sets minimum allowed value.
Declaration
public int? SpinnerMin { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
SpinnerNumberFormat
Gets or sets the format of numbers passed to Globalize plugin if it is included.
Declaration
public string SpinnerNumberFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SpinnerPage
Gets or sets the number of steps to take when paging via the pageUp/pageDown JavaScript methods.
Declaration
public int SpinnerPage { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SpinnerStep
Gets or sets the size of the step to take when spinning via buttons or via the stepUp/stepDown JavaScript methods.
Declaration
public int SpinnerStep { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SpinnerUpIcon
Gets or sets the icon class (form UI theme icons) for up button.
Declaration
public string SpinnerUpIcon { get; set; }
Property Value
Type | Description |
---|---|
System.String |
TimeRule
Gets or sets if the value should be valid time (hh:mm format and optional am/pm at the end).
Declaration
public bool TimeRule { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UrlRule
Gets or sets if the value should be valid url.
Declaration
public bool UrlRule { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Value
Gets or sets the set of value:label pairs for select element (takes precedence over ValueDictionary property).
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
SetDataAction(String, String)
Sets the action to get the AJAX data for the select element (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Select) or jQuery UI Autocomplete widget (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Autocomplete).
Declaration
protected void SetDataAction(string action, string controller = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | action | The name of the action method. |
System.String | controller | The name of the controller. |
SetDataRoute(String)
Sets the name of the route to be used to generate URL to get the AJAX data for the select element (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Select) or jQuery UI Autocomplete widget (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Autocomplete).
Declaration
protected void SetDataRoute(string route)
Parameters
Type | Name | Description |
---|---|---|
System.String | route | The name of the route. |
SetValueDictionary(Type, String)
Sets data for select element (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Select)
Declaration
protected void SetValueDictionary(Type valueProviderType, string valueProviderMethodName)
Parameters
Type | Name | Description |
---|---|---|
Type | valueProviderType | The type of class which contains a method which will provide data for select element (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes.Select). This class must have public parameterless constructor. |
System.String | valueProviderMethodName | The name of method which will provide data for select element (if type is JqGridColumnSearchTypes/JqGridColumnEditTypes..Select). This method must return an object which implements IDictionary<string, string>. |