forked from DataTables/Buttons
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmultiple.xml
More file actions
61 lines (49 loc) · 1.41 KB
/
Copy pathmultiple.xml
File metadata and controls
61 lines (49 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="html" order="11">
<css lib="datatables buttons">
div.dt-buttons {
clear: both;
}
</css>
<js lib="jquery datatables buttons">
<![CDATA[
$(document).ready(function() {
var table = $('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
{
text: 'Button 1',
action: function ( e, dt, node, config ) {
alert( 'Button 1 clicked on' );
}
}
]
} );
new $.fn.dataTable.Buttons( table, {
buttons: [
{
text: 'Button 2',
action: function ( e, dt, node, conf ) {
alert( 'Button 2 clicked on' );
}
},
{
text: 'Button 3',
action: function ( e, dt, node, conf ) {
alert( 'Button 3 clicked on' );
}
}
]
} );
table.buttons( 1, null ).container().appendTo(
table.table().container()
);
} );
]]>
</js>
<title lib="Buttons">Multiple button groups</title>
<info>< arbitrarily gives it the ability to have multiple button instances created for a single DataTable. This can be useful if you wish to display button groups with different functionality (file export, editing, etc).
In this example the `b-init buttons` option is used to construct the first buttons set. The `new $.fn.dataTable.Buttons()` constructor is then used to create a second and finally the API used to insert this into the document.
]]></info>
</dt-example>