# Datatable declare a column as a button or checklist

**URL:** https://community.plotly.com/t/datatable-declare-a-column-as-a-button-or-checklist/51306
**Category:** Dash Python
**Created:** [March 23, 2021, 9:05am UTC](https://community.plotly.com/t/datatable-declare-a-column-as-a-button-or-checklist/51306 "2021-03-23T09:05:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fkamm](https://avatars.discourse-cdn.com/v4/letter/f/f14d63/32.png) [@fkamm](https://community.plotly.com/u/fkamm)
#### Post date: [March 23, 2021, 9:05am UTC](https://community.plotly.com/t/datatable-declare-a-column-as-a-button-or-checklist/51306/1 "2021-03-23T09:05:09Z")

</div>

Hi guys,

I would like to create a datatable with the last column being a html.A Element with a button.

Is there a simple way like the dropdown feature ([Dropdowns Inside DataTable | Dash for Python Documentation | Plotly](https://dash.plotly.com/datatable/dropdowns)) to simply declare a column as a button or checkbox or anything else?  
Where can I find the possibilities to use with columns (id, dropdown, editable, etc.)

```auto
import dash
import dash_table
import pandas as pd
import dash_html_components as html
from flask import Flask

df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/solar.csv')

server = Flask( __name__ )
app = dash.Dash(server=server)

buttons = {
    index: html.Div(style={'height': 100, 'width': '100%'},
                children=(
                    html.A(id='a-fileserver',
                           children=[html.Button('Fileserver', id='fileserver-button-{}'.format(index), n_clicks=0)],
                           target='_blank',
                           href=value,
                           style={'display': 'inline-block',
                                  'padding-right': '2%'})
                )
                )
    for value, index in df["Generation (GWh)"].iteritems()
}

app.layout = dash_table.DataTable(
    id='table',
    columns=[{"name": i, "id": i} for i in df.columns],
    data=df.to_dict('records'),
)

if __name__ == ' __main__':
    app.run_server(debug=True)

```

Thank you,  
Felix

---

<div class="post-metadata">

### Author: ![danpryjma](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@danpryjma](https://community.plotly.com/u/danpryjma)
#### Post date: [March 24, 2021, 9:00am UTC](https://community.plotly.com/t/datatable-declare-a-column-as-a-button-or-checklist/51306/2 "2021-03-24T09:00:31Z")

</div>

You can use markdown inside the datatable. There are multiple posts here in the community about that, here is one:

> [@Datatable Markdown Link Trouble](https://community.plotly.com/t/datatable-markdown-link-trouble/36458/2):
>
> In case anyone comes along with a similar question, here’s how I fixed it after some digging: all markdown links must be formatted as such: string to be clicked Here’s how I turned my dataframe column into a dash table of clickable links: def gen\_table(dict): df = pd.DataFrame(dict) #format dataframe column of urls so that it displays as hyperlink def display\_links(df): links = df['link'].to\_list() rows = [] for x in links: li…

---

<div class="post-metadata">

### Author: ![fkamm](https://avatars.discourse-cdn.com/v4/letter/f/f14d63/32.png) [@fkamm](https://community.plotly.com/u/fkamm)
#### Post date: [March 24, 2021, 10:14am UTC](https://community.plotly.com/t/datatable-declare-a-column-as-a-button-or-checklist/51306/3 "2021-03-24T10:14:31Z")

</div>

Thank you, your solution solved my problem.

Where do I find the parameter for columns (id, name, type, presentation,…)?
