Search
23683 results 91-100
Reference
columns.editField› Define which field a column should trigger editing onThe Editor inline() and bubble() methods trigger individual field editing based on certain elements on the page (typically table cells) and will attempt to determine what field in the Editor form should be the one that is edited based on the given table cell. However, automatic detection isn't always possible, particularly when working with joined database tables where it is quite common to display a label value in the DataTable display column, but edit a related value (a database id column for example) when editing the row's data. This option provides the ability to tell Editor what field(s) should be edited when a particular column is activated for editing using inline() and bubble(). The values this option can take are defined by the field names that are used for the Editor form (fields.name). Any field name defined in the Editor instance can be used as a value here. As of Editor 1.5, for bubble() editing this option can be an array of field names to allow multiple fields to be shown for editing at a time.columns.width› Column width assignmentThis parameter can be used to define the width of a column, and may take any CSS value (3em, 20px etc). Please note that pixel perfect column width is virtually impossible to achieve in tables with dynamic content, so do not be surprised if the width of the column is off by a few pixels from what you assign using this property. Column width in tables depends upon many properties such as cell borders, table borders, the border-collapse property, the content of the table and many other properties. Both DataTables and the browsers attempt to lay the table out in an optimal manner taking this options all into account.columns.search› Per column initial search configurationThis option can be used to set a search term for a column during initialisation. The search term can then be retrieved or updated via the column().search() API. Please note that the value given for this option is an object, as defined by DataTable.SearchOptions to provide the full range of search options. As such the actual value to search on is given by the search property in the object.columns.render› Render (process) the data for use in the tableis returned by the columns.render option (regardless of ifcolumns.orderSequence› Order direction application sequenceYou can control the default ordering direction, and even alter the behaviour of the order handler (i.e. only allow ascending sorting, reverse the default sequence, etc) using this parameter. Values that can be given in this array are: asc - Ascending order desc - Descending order (i.e. empty string) - data index order. Note that this option is available as of DataTables 2.0 and newer. Prior to DataTables 2 this option defaulted to [ 'asc', 'desc' ]. DataTables 2 added the third option to the array with the empty string included in the default for the no sort state. If you would like to use the DataTables 1.x behaviour, set the default using: DataTable.defaults.column.orderSequence = ['asc', 'desc'];columns.orderDataType› Live DOM sorting type assignmentDataTables' primary order method (the ordering feature) makes use of data that has been cached in memory rather than reading the data directly from the DOM every time an order is performed for performance reasons (reading from the DOM is inherently slow). However, there are times when you do actually want to read directly from the DOM, acknowledging that there will be a performance hit, for example when you have form elements in the table and the end user can alter the values. This configuration option is provided to allow plug-ins to provide this capability in DataTables. Please note that there are no columns.orderDataType plug-ins built into DataTables, they must be added separately. See the DataTables sorting plug-ins page for further information.columns.defaultContent› Set default, static, content for a columnin the row), the columns.render option should be used.columns.data› Set the data source for the column from the rows data object / arraybetween this option and columns.render) will be used bycolumns.createdCell› Cell created callback to allow DOM manipulationas a complement to columns.render allowing modification of thecolumns.contentPadding› Add padding to the text content used when calculating the optimal width for a table.The first thing to say about this property is that generally you shouldn't need this! Having said that, it can be useful on rare occasions. When DataTables calculates the column widths to assign to each column, it finds the longest string in each column and then constructs a temporary table and reads the widths from that. The problem with this is that "mmm" is much wider then "iiii", but the latter is a longer string - thus the calculation can go wrong (doing it properly and putting it into an DOM object and measuring that is horribly slow!). Thus as a "work around" we provide this option. It will append its value to the text that is found to be the longest string for the column - i.e. padding.
Forum
- 1st Jul 2024access the columns array from API ?and click the DataTables- Columns button to filter the
- 25th Jun 2024Maximum column width for all columnsmaximum width for all columns? The table is generated
- 19th Jun 2024row grouping considering 2 columns (multi level grouping)to get the 2 columns grouping work. Can someone
- 13th Jun 2024How to obtain a column's settings (searchable, orderable, render function...)way to get a column's settings which we define
- 8th Jun 2024Time only columnswant to combine the columns to a single datetime
- 8th Jun 2024How to change value of columns in ExportOptionsa simple example using column-selector as a function. https://live.datatables.net/zegohiha/1/edit
- 29th May 2024How to display options of three columns within one dropdownbe repopulated var currSearch = column.search(); if (currSearch) { // Use RegEx
- 28th May 2024Problem setting the width to columnsthe same number of columns, some are five, ten
- 28th May 2024columns(':visible') return invisible columnsClick on "Toggle second column's visiblity" button Result: Errors
- 16th May 2024How can I disable the "Auto-detected columns type"?additional information from other columns (IE red text saying