Click or drag to resize
DataTables Namespace
The DataTables namespace provides the classes and methods required for the DataTables and Editor Javascript libraries to communicate with a .NET server through the description of the tables to be edited with the 'Editor' class.
Classes
  ClassDescription
Public classDatabase
DataTables Database connection object. Create a database connection which may then have queries performed upon it. This is a database abstraction class that can be used on multiple different databases. As a result of this, it might not be suitable to perform complex queries through this interface or vendor specific queries, but everything required for basic database interaction is provided through the abstracted methods.
Public classDtRequest
Representation of a DataTables or Editor request. This can be any form of request from the two libraries, including a standard DataTables get, a server-side processing request, or an Editor create, edit or delete command.
Public classDtRequestColumnT
Column class for server-side processing nested data
Public classDtRequestOrderT
Order class for server-side processing nested data
Public classDtRequestSearchT
Search class for server-side processing nested data
Public classDtResponse
DataTables and Editor response object. This object can be used to construct and contain the data in response to a DataTables or Editor request before JSON encoding it and sending to the client-side. Note that this object uses lowercase property names as this it output directly to JSON, so the format and parameter names that DataTables and Editor expect must be used.
Public classDtResponseFieldError
Editor field error nested class. Describes an error message for a field if it is in an error state.
Public classDtResponseResponseUpload
Upload response information
Public classEditor
DataTables Editor base class for creating editable tables. Editor class instances are capable of servicing all of the requests that DataTables and Editor will make from the client-side - specifically: * Get data * Create new record * Edit existing record * Delete existing records The Editor instance is configured with information regarding the database table fields that you which to make editable, and other information needed to read and write to the database (table name for example!). This documentation is very much focused on describing the API presented by these DataTables Editor classes. For a more general overview of how the Editor class is used, and how to install Editor on your server, please refer to the Editor manual ( https://editor.datatables.net/manual ).
Public classEditorHttpNameAttribute
Define the HTTP name (used for both the JSON and incoming HTTP values on form submit) for the field defined by the parameter. The parameter name is used as the database column name automatically.
Public classEditorModel
This base class is used to extend models used in the 'Model()' method for the Editor class. Currently it doesn't actually do anything, but there is a chance it will in future, so this is just for future compatibility
Public classEditorTypeErrorAttribute
Define an error message for cases where the data given cannot be stored in parameter type.
Public classField
Field definitions for the DataTables Editor. Each Database column that is used with Editor can be described with this Field method (both for Editor and Join instances). It basically tells Editor what table column to use, how to format the data and if you want to read and/or write this column.
Public classFormat
Formatter methods for the DataTables Editor. All of the methods in this class return a delegate that can be used in the
GetFormatter
and
SetFormatter
methods of the
Field
class. Each method may define its own parameters that configure how the formatter operates. For example the date / time formatters take information on the formatting to be used.
Public classMJoin
The MJoin class provides a one-to-many join link for Editor. This can be useful in cases were an attribute can take multiple values at the same time - for example cumulative security access levels. Typically the MJoin class should be used with a link table, but this is optional. Please note that if you don't use a link table you should be aware that on edit the linked rows are deleted and then reinserted, thus if any values should be retained they should also be submitted. Please refer to the Editor .NET documentation for further information https://editor.datatables.net/manual/net
Public classOptions
The Options class provides a convenient method of specifying where Editor should get the list of options for a `select`, `radio` or `checkbox` field. This is normally from a table that is _left joined_ to the main table being edited, and a list of the values available from the joined table is shown to the end user to let them select from. `Options` instances are used with the `Field.Options()` method.
Public classPostCreateEventArgs
Arguments for the 'PostCreate' Editor event
Public classPostEditEventArgs
Arguments for the 'PostEdit' event
Public classPostGetEventArgs
Arguments for the 'PostGet' Editor event
Public classPostRemoveEventArgs
Arguments for the 'PostRemove' Editor event
Public classPostUploadEventArgs
Arguments for the 'PostUpload' Editor event
Public classPreCreateEventArgs
Arguments for the 'PreCreate' Editor event
Public classPreEditEventArgs
Arguments for the 'PreEdit' Editor event
Public classPreGetEventArgs
Arguments for the 'PreGet' Editor event
Public classPreRemoveEventArgs
Arguments for the 'PreRemove' Editor event
Public classPreUploadEventArgs
Arguments for the 'PreUpload' Editor event
Public classQuery
The Query class provides methods to craft an individual query against the database. The typical pattern for using this class is through the 'Database'. Typically it would not be initialised directly. Note that this is a stub class that a driver will extend and complete as required for individual database types. Individual drivers could add additional methods, but this is discouraged to ensure that the API is the same for all database types.
Public classResult
Result object given by a
Query
performed on a database. The typical pattern for using this class is to receive an instance of it as a result of using the
Database
and
Query
class methods that return a result. This class should not be initialised independently. Note that this is a stub class that a driver will extend and complete as required for individual database types. Individual drivers could add additional methods, but this is discouraged to ensure that the API is the same for all database types.
Public classUpload
Upload class for Editor. This class provides the ability to easily specify file upload information, specifically how the file should be recorded on the server (database and file system). An instance of this class is attached to a field using the 'Field.upload()' method. When Editor detects a file upload for that file the information provided for this instance is executed. The configuration is primarily driven through the 'db' and 'action' methods
Public classValidation
Validation methods for DataTables Editor fields. All of the methods defined in this class return a delegate that can be used by
Field
instance's
Validator
method. Each method may define its own parameters that configure how the formatter operates. For example the `minLen` validator takes information on the minimum length of value to accept. Additionally each method can optionally take a
ValidationOpts
instance that controls common validation options and error messages. The validation delegates return `null` for validate data and a string for invalid data, with the string being the error message.
Public classValidationOpts
Common validation options that can be specified for all validation methods.
Public classWriteCreateEventArgs
Arguments for the 'WriteCreate' Editor event
Public classWriteEditEventArgs
Arguments for the 'WriteEdit' Editor event
Enumerations
  EnumerationDescription
Public enumerationDtRequestRequestTypes
Request type values
Public enumerationFieldSetType
Set options for the
Set()
method, controlling when this field's value is set on the database
Public enumerationUploadDbType
Database upload options for the 'fields' option in the 'Db()' method. These are used to provide easy information about the file that will be stored in the database.