Brought in following assets that Kevin's EDI project will be using:
[openemr.git] / public / assets / datatables-fixedcolumns-3-2-1 / docs / api / fixedColumns().rowIndex().xml
blob9980cfffb5522bb4601f4b46d44bf6f6c3fc6536
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <dt-api library="FixedColumns">
3         <name>fixedColumns().rowIndex()</name>
4         <summary>Get the row index of a row in a fixed column</summary>
5         <since>3.1.0</since>
7         <type type="function">
8                 <signature>fixedColumns().rowIndex( row )</signature>
9                 <parameter type="jQuery|node" name="row">
10                         The row (`-tag tr`) to get the row index of. This can be either a row in the fixed columns or in the host DataTable.
11                 </parameter>
12                 <returns type="integer">
13                         The row index for the given row
14                 </returns>
15                 <description>
16                         Get the row index (`dt-api row().index()`) for a `-tag tr` element, regardless of if the row is contained in a fixed column, or in the scrolling table.
17                 </description>
18         </type>
20         <deprecated>
21                 <version>3.2.1</version>
22                 <description>
23                         As of DataTables 1.10.11 and FixedColumns 3.2.1 this method is no longer required to obtain a row index from a node as the `dt-api row()` method will accept the `-tag tr` and `-tag td` elements in the fixed column as selector arguments.
24                 </description>
25                 <example title="Get the row index for any row clicked upon in a table (from the fixed column, or the main table)"><![CDATA[
27 var table = $('myTable').DataTable();
29 $(table.table().container()).on( 'click', 'tr', function () {
30         var row = table.row( this );
31         
32         console.log( row.index() );
33 } );
35 ]]>
36                 </example>
37         </deprecated>
39         <description>
40                 When working with FixedColumns, there is additional complexity in the DataTable as the fixed columns are not technically part of the host DataTables - they just look like it! They are in fact HTML `-tag table` elements themselves, with specific styling to visually integrate them with the host table.
42                 Since the fixed columns are the ones that the end user sees, they are also the ones that the user will interact with - for example clicking on a cell in the fixed column will give the fixed column cell and _not_ the cell in the DataTable!
44                 This method is provided to be able to convert from a row in the fixed columns into a DataTables row, by returning the row data index (this is _not_ the visible index, but rather an index internal to DataTables!). That index can then be used with the `dt-api row()` method to obtain a reference to the main DataTable row.
45         </description>
47         <example title="Get the row index for any row clicked upon in a table"><![CDATA[
49 $(document).on( 'click', 'tr', function () {
50         console.log(
51                 $('#example').DataTable().fixedColumns().rowIndex()
52         );
53 } );
55 ]]></example>
56 </dt-api>