• Skip to primary navigation
  • Skip to main content
pythonGrid

pythonGrid

Datagrid for Python Web Frameworks

  • Home
  • Docs
  • Demo
  • Download
  • Contact

docs

enable_export()

pythongridstg · May 21, 2020 ·

  • Parameter(s):
    • type: The only export type is CSV at the moment.
  • Description:
    • The export icon appears on the left side of the footer when enabled.

Example:

grid.enable_export()

The export requires PythonGridDbExport class that must be initiated inside export() function in route or controller.

@app.route('/export', methods=['GET', 'POST'])
def export(): 
    exp = PythonGridDbExport('SELECT * FROM orders') 
    return exp.export()

set_col_width()

pythongridstg · April 28, 2020 ·

  • Parameters:
    • col_name: column name
    • width: width
  • Description:
    • Specify column width in pixels. The width should be an integer value.
  • Remark:
    •  pythonGrid will automatically resize the column width based on its content during page load. Users can also double-click a column divider to resize a column.

Example:

grid.set_col_width('comments', 600)

set_col_align()

pythongridstg · April 28, 2020 ·

  • Parameters:
    • col_name: column name
    • align: alignment direction: “left”, “center”, or “right”.
  • Description:
    • The horizontal alignment of text in a column. The default alignment value is left.

Example:

grid.set_col_align('status', 'center')

enable_pagecount()

pythongridstg · April 28, 2020 ·

  • Parameters:
    • page_count: boolean: true or false.
  • Description:
    • Enable page count in the pager. Default to true.
  • Remark:
    • Set to false to optimize performance for very large (e.g. millions) database table.

Example:

grid.enable_pagecount(True)

enable_rownumbers()

pythongridstg · April 28, 2020 ·

  • Parameters:
    • has_rownumbers: boolean value indicating whether row number is displayed.
  • Description:
    • Display row numbers before each row.

Example:

grid.enable_rownumbers(True)
  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to page 4
  • Go to Next Page »

pythonGrid

pythonGrid is a free and open-source datagrid library made for Python web framework

Copyright © 2025 · pythonGrid | privacy policy

  • Demo
  • Documentation
  • Download
  • T&C
  • EULA
  • Contact Us