Properties to customize grid theme, see full list here : https://nhn.github.io/tui.grid/latest/Grid/.
set_grid_theme(
selection.background = NULL,
selection.border = NULL,
scrollbar.border = NULL,
scrollbar.background = NULL,
scrollbar.emptySpace = NULL,
scrollbar.thumb = NULL,
scrollbar.active = NULL,
outline.border = NULL,
outline.showVerticalBorder = NULL,
frozenBorder.border = NULL,
area.header.border = NULL,
area.header.background = NULL,
area.body.background = NULL,
area.summary.border = NULL,
area.summary.background = NULL,
row.even.background = NULL,
row.even.text = NULL,
row.odd.background = NULL,
row.odd.text = NULL,
row.dummy.background = NULL,
row.hover.background = NULL,
cell.normal.background = NULL,
cell.normal.border = NULL,
cell.normal.text = NULL,
cell.normal.showVerticalBorder = NULL,
cell.normal.showHorizontalBorder = NULL,
cell.header.background = NULL,
cell.header.border = NULL,
cell.header.text = NULL,
cell.header.showVerticalBorder = NULL,
cell.header.showHorizontalBorder = NULL,
cell.rowHeader.background = NULL,
cell.rowHeader.border = NULL,
cell.rowHeader.text = NULL,
cell.rowHeader.showVerticalBorder = NULL,
cell.rowHeader.showHorizontalBorder = NULL,
cell.summary.background = NULL,
cell.summary.border = NULL,
cell.summary.text = NULL,
cell.summary.showVerticalBorder = NULL,
cell.summary.showHorizontalBorder = NULL,
cell.selectedHeader.background = NULL,
cell.selectedRowHeader.background = NULL,
cell.focused.border = NULL,
cell.focused.background = NULL,
cell.focusedInactive.border = NULL,
cell.required.background = NULL,
cell.required.text = NULL,
cell.editable.background = NULL,
cell.editable.text = NULL,
cell.disabled.background = NULL,
cell.disabled.text = NULL,
cell.invalid.background = NULL,
cell.invalid.text = NULL
)reset_grid_theme()
No return value.
Background color of a selection layer.
Border color of a selection layer.
Border color of scrollbars.
Background color of scrollbars.
Color of extra spaces except scrollbar.
Color of thumbs in scrollbars.
Color of arrows(for IE) or thumb:hover(for other browsers) in scrollbars.
Color of the table outline.
Whether vertical outlines of the table are visible.
Border color of a frozen border.
Border color of the header area in the table.
Background color of the header area in the table.
Background color of the body area in the table.
Border color of the summary area in the table.
Background color of the summary area in the table.
background color of even row.
text color of even row.
background color of cells in odd row.
text color of odd row.
background color of dummy row.
background color of hovered row.
Background color of normal cells.
Border color of normal cells.
Text color of normal cells.
Whether vertical borders of normal cells are visible.
Whether horizontal borders of normal cells are visible.
Background color of header cells.
border color of header cells.
text color of header cells.
Whether vertical borders of header cells are visible.
Whether horizontal borders of header cells are visible.
Background color of row's header cells.
border color of row's header cells.
text color of row's header cells.
Whether vertical borders of row's header cells are visible.
Whether horizontal borders of row's header cells are visible.
Background color of cells in the summary area.
border color of cells in the summary area.
text color of cells in the summary area.
Whether vertical borders of cells in the summary area are visible.
Whether horizontal borders of cells in the summary area are visible.
background color of selected header cells.
background color of selected row's head cells.
border color of a focused cell.
background color of a focused cell.
border color of a inactive focus cell.
background color of required cells.
text color of required cells.
background color of the editable cells.
text color of the selected editable cells.
background color of disabled cells.
text color of disabled cells.
background color of invalid cells.
text color of invalid cells.
library(toastui)
# Default is "clean" theme
datagrid(rolling_stones_50)
# others builtins themes
datagrid(rolling_stones_50, theme = "striped")
datagrid(rolling_stones_50, theme = "default")
# Set global theme options
set_grid_theme(
row.even.background = "#ddebf7",
cell.normal.border = "#9bc2e6",
cell.normal.showVerticalBorder = TRUE,
cell.normal.showHorizontalBorder = TRUE,
cell.header.background = "#5b9bd5",
cell.header.text = "#FFF",
cell.selectedHeader.background = "#013ADF",
cell.focused.border = "#013ADF"
)
datagrid(rolling_stones_50)
# Remove theme
reset_grid_theme()
Run the code above in your browser using DataLab