@@ -234,6 +234,11 @@ class DataGrid(DOMWidget):
234234 Dict to specify custom column sizes
235235 The keys (strings) indicate the names of the columns
236236 The values (integers) indicate the widths
237+ grid_style : Dict of {propertyName: string | VegaExpr | Dict}
238+ Dict to specify global grid styles.
239+ The keys (strings) indicate the styling property
240+ The values (css color properties or Vega Expression) indicate the values
241+ See below for all supported styling properties
237242
238243 Accessors (not observable traitlets)
239244 ---------
@@ -244,6 +249,30 @@ class DataGrid(DOMWidget):
244249 List of values for all selected cells.
245250 selected_cell_iterator : iterator
246251 An iterator to traverse selected cells one by one.
252+
253+ Supported styling properties:
254+ void_color : color of the area where the grid is not painted on the canvas
255+ background_color : background color for all body cells
256+ row_background_color : row-wise background color (can take a string or Vega Expression)
257+ column_background_color : column-wise background color (can take a string of Vega Expression)
258+ grid_line_color : color of both vertical and horizontal grid lines
259+ vertical_grid_line_color : vertical grid line color
260+ horizontal_grid_line_color : horizontal grid line color
261+ header_background_color : background color for all non-body cells (index and columns)
262+ header_grid_line_color : grid line color for all non-body cells (index and columns)
263+ header_vertical_grid_line_color : vertical grid line color for all non-body cells
264+ header_horizontal_grid_line_color : horizontal grid line color for all non-body cells
265+ selection_fill_color : fill color of selected area
266+ selection_border_color : border color of selected area
267+ header_selection_fill_color : fill color of headers intersecting with selected area at column or row
268+ header_selection_border_color : border color of headers intersecting with selected area at column or row
269+ cursor_fill_color : fill color of cursor
270+ cursor_border_color : border color of cursor
271+ scroll_shadow : color parameters for scroll shadow (vertical and horizontal). Takes three paramaters.
272+ size : size of shadow in pixels
273+ color1 : gradient color 1
274+ color2 : gradient color 2
275+ color3 : gradient color 3
247276 """
248277
249278 _model_name = Unicode ("DataGridModel" ).tag (sync = True )
0 commit comments