Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/options/column_control.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ The [`columnControl`](https://datatables.net/extensions/columncontrol/config) op
The examples should give you a quick sense of how to use `columnControl`. You are invited to consult the datatables documentation for many more column control [examples](https://datatables.net/extensions/columncontrol/examples/) - see also Allan's [post](https://datatables.net/blog/2025/columncontrol) in which the extension was introduced.

```{code-cell} ipython3
:tags: [full-width]

import itables

itables.init_notebook_mode()
Expand All @@ -33,6 +31,8 @@ df = itables.sample_dfs.get_countries()
The `columnControl` option can take as value the list of controls that should be added to the table columns.

```{code-cell} ipython3
:tags: [full-width]

itables.show(
df,
columnControl=["order", "colVisDropdown", "searchDropdown"],
Expand All @@ -51,6 +51,8 @@ you probably want to deactivate the default ordering icons - that's the purpose
Nested lists are mapped to dropdowns:

```{code-cell} ipython3
:tags: [full-width]

itables.show(
df,
columnControl=["order", ["orderAsc", "orderDesc", "search"]],
Expand All @@ -63,6 +65,8 @@ itables.show(
The column controls can also be added to a table footer:

```{code-cell} ipython3
:tags: [full-width]

itables.show(
df,
columnControl=[
Expand Down
8 changes: 4 additions & 4 deletions docs/py/options/column_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#
# The examples should give you a quick sense of how to use `columnControl`. You are invited to consult the datatables documentation for many more column control [examples](https://datatables.net/extensions/columncontrol/examples/) - see also Allan's [post](https://datatables.net/blog/2025/columncontrol) in which the extension was introduced.

# %% tags=["full-width"]
# %%
import itables

itables.init_notebook_mode()
Expand All @@ -33,7 +33,7 @@
#
# The `columnControl` option can take as value the list of controls that should be added to the table columns.

# %%
# %% tags=["full-width"]
itables.show(
df,
columnControl=["order", "colVisDropdown", "searchDropdown"],
Expand All @@ -51,7 +51,7 @@
#
# Nested lists are mapped to dropdowns:

# %%
# %% tags=["full-width"]
itables.show(
df,
columnControl=["order", ["orderAsc", "orderDesc", "search"]],
Expand All @@ -63,7 +63,7 @@
#
# The column controls can also be added to a table footer:

# %%
# %% tags=["full-width"]
itables.show(
df,
columnControl=[
Expand Down
Loading