Search
10784 results 71-80
Reference
searchPanes.initCollapsed› Collapse the SearchPanes on initialisationThis option is an alias to searchPanes.initCollapsed, which should be preferred when using DataTables 2+. It can be used to configure SearchPanes regardless of how the panes are inserted into the document (layout or searchPanes). Please refer to the documentation for searchPanes.initCollapsed for full details of this option.columns.searchPanes.initCollapsed› Collapse Specific SearchPanes on initialisationnot be collapsed on initialisation. This option allows thatsearchPanes.initCollapsed› Collapse the SearchPanes on initialisationnot be collapsed on initialisation. This option allows that
Examples
- FixedHeader › Alternative initialisationp>As well as initialisation through the
- Editor › Editor advanced initialisation examplessection show more advanced initialisation and configuration techniques than
- Buttons › InitialisationButtons is an unimaginatively named library that provides buttons for DataTables. Simple, single click buttons can be useful when used in combination with a table providing end users with the ability to interact with the table. This can take the form of exporting data, controlling column visibility, triggering an editing action or activating any other custom method you wish to use. The set of examples available here show how Buttons can be initialised and the basics of how to use it.
- AutoFill › Initialisation examplesSpreadsheets such as Excel and Google Docs have a very handy data duplication option of an auto fill tool. The AutoFill library for DataTables provides a similar interface for DataTables (even extending upon it to provide complex data interaction options). AutoFill also provides full support for Editor allowing end users to update data very quickly. The examples in this section show how AutoFill can be used with DataTables.
- DataTables › Basic initialisationDataTables is a simple-to-use jQuery plug-in with a huge range of customisable options. The examples in this section demonstrate basic initialisation of DataTables and how it can be easily customised by passing an object with the options you want.
- DataTables › Advanced initialisationshown in the basic initialisation of this documentation. Through
- SearchBuilder › SearchBuilder InitialisationThis is the section for showing the key customisation options that are available with SearchBuilder.
Forum
- 15th Oct 2014Datatable and data-attribute HTML5 instead of JS init wayThanks for sharing your solution with us! You might also be interested in checking out this Github thread which discusses something similar. I'm still considering this for DataTables core (haven't had time to properly look into it yet!). Allan
- 14th Oct 2014Blank Screen on init of editorI just found out I was using an older version of the php server side files.
- 8th Sep 2014mRender when providing a list of items called on init for every itemIf you are Ajax loading the data you can use deferRender to reduce the number of times that mRender is called. However, recall that mRender is access for all data types, so it might be called to get sorting data or filtering data for the cell(s) in question, depending on the configuration of your table. Allan
- 16th Jul 2014datatable initYou put those lines in your page's javascript file, or directly in a tag on the page.
- 19th May 2014Performance Bug - deep cloning the data passed on init (DT 1.10)Nice one. Thanks for letting me know about that. I'll make sure something to fix this is in for 1.10.1. Allan
- 28th Feb 2014Table hidden on page init: columns don't align until column head clickedHa! ok, I actually just completely cheated, gave the th a class name then added $(".namehere").click(); to the function... while this will work for right now, is there a better way of doing this?
- 14th Jan 2014Drill down rows opened after initExcellent to hear you managed to resolve the issue - nice one :-)
- 17th Jul 2012Adjust sScrollY after InitOK, I replaced the call to fnDraw() with _fnScrollDraw() and that solves the server processing ajax problem. Here's what I have now: [code] /** * UI Layout Callback: resizePaneDataTables * * This callback is used when a layout-pane contains 1 or more DataTable objects. * - whether the DataTable is a child of the pane or is nested within other elements * Assign this callback to the pane.onresize event: * * SAMPLE: * $("#elem").tabs({ show: $.layout.callbacks.resizePaneDataTables }); * $("body").layout({ center__onresize: $.layout.callbacks.resizePaneDataTables }); * * Version: 1.0 - 2012-07-06 * Author: Robert Brower (atomofthought@yahoo.com) */ ; (function ($) { var _ = $.layout; // make sure the callbacks branch exists if (!_.callbacks) _.callbacks = {}; _.callbacks.resizePaneDataTables = function (x, ui) { // may be called EITHER from layout-pane.onresize OR tabs.show var $P = ui.jquery ? ui : $(ui.panel); // find all VISIBLE data tables inside this pane and resize them $($.fn.dataTable.fnTables(true)).each(function(i, table) { var $table = $(table); if ($.contains($table.get(), $P)) { var $dataTable = $table.dataTable(); $dataTable.fnAdjustColumnSizing(false); var $dataTableWrapper = $table.closest(".dataTables_wrapper"); var panelHeight = $dataTableWrapper.parent().height(); var toolbarHeights = 0; $dataTableWrapper.find(".fg-toolbar").each(function(i, obj) { toolbarHeights = toolbarHeights + $(obj).height(); }); var scrollHeadHeight = $dataTableWrapper.find(".dataTables_scrollHead").height(); var height = panelHeight - toolbarHeights - scrollHeadHeight; $dataTableWrapper.find(".dataTables_scrollBody").height(height - 24); $dataTable._fnScrollDraw(); } }); }; })(jQuery); [/code] If anyone knows why I need to subtract 24 from the height please let me know. Bob
- 9th May 2012How to get dataTable object after init?This is an old thread now - since 1.8 (possibly 1.7 - can't actually remember off the top of my head) you can do exactly as mot suggests - you don't need to use $().data - you can just call the $().dataTable function on your table again without any options being passed. Allan
- 9th Jan 2012How to change options after init ?My bad !! I found it on the API page on function fnSort. I guess i need one more coffee.