Learn R Programming

toastui (version 0.4.0)

grid_columns_opts: Set global columns options

Description

Set options for all columns.

Usage

grid_columns_opts(
  grid,
  minWidth = NULL,
  resizable = NULL,
  frozenCount = NULL,
  frozenBorderWidth = NULL
)

Value

A datagrid htmlwidget.

Arguments

grid

A table created with datagrid().

minWidth

Minimum width of each columns.

resizable

If set to true, resize-handles of each columns will be shown.

frozenCount

The number of frozen columns.

frozenBorderWidth

The value of frozen border width. When the frozen columns are created by "frozenCount" option, the frozen border width set.

Examples

Run this code
library(toastui)

# Set minimal width for columns
datagrid(countries) %>%
  grid_columns_opts(
    minWidth = 140
  )

# Freeze two first columns
datagrid(countries) %>%
  grid_columns_opts(
    minWidth = 140,
    frozenCount = 2,
    frozenBorderWidth = 5
  )

Run the code above in your browser using DataLab