• Skip to primary navigation
  • Skip to main content
pythonGrid

pythonGrid

Datagrid for Python Web Frameworks

  • Home
  • Docs
  • Demo
  • Download
  • Contact

docs

set_dimension()

pythongridstg · April 28, 2020 ·

  • Parameter(s):
    • width: Datagrid width in pixel
    • height: Datagrid height. The default is 100% which expanses grid vertically to the entire browser height in pixel
    • shrinkToFit: true or false. If set to false, a horizontal bar will appear when the total width of the grid is wider than the dimension width. The default is true.
  • Description:
    • Set the overall height and width
  • Remark:
    • It is recommended to set shrinkToFit to false when there are a large number of columns to display.

Example:

grid.set_dimension(800, 400)

set_pagesize()

pythongridstg · April 28, 2020 ·

  • Parameter(s):
    • pagesize: An integer value indicates the number of results displaying in a page in the datagrid
  • Description:
    • This function changes the default pagination of the datagrid. The default is 20.
  • Remark:
    • Pagination is disabled when set_scroll() is set to true. See set_scroll() for more information.

Example

grid.set_pagesize(50)

set_col_hidden()

pythongridstg · April 28, 2020 ·

  • Parameter(s):
    • col_name: Column name
    • new_title: Display title in the grid column header
  • Description:
    • Change data grid column header text from the default data field name to a more user-friendly name
  • Remark:
    • The default column header text is the database table data field name

Example:

grid.set_col_hidden(['customerNumber, logTime, shippedDate, requiredDate'])

set_col_title()

pythongridstg · April 28, 2020 ·

  • Parameter(s):
    • col_name: Colume name
    • new_title: Display title in grid column header
  • Description:
    • Change data grid column header text from the default data field name to a more user-friendly name
  • Remark:
    • The default column header text is the database table data field name

Example:

grid.set_col_title('orderNumber', 'Order #')

set_caption()

pythongridstg · April 28, 2020 ·

  • Parameter(s):
    • caption: the text for the grid caption
  • Description:
    • When set, this method displays text above the column header as the datagrid caption. When this function is not called, pythonGrid sets the table name as the default caption. For example, the caption will be displayed as “Orders” when the table name is “Orders”.
  • Remark:
    • When the caption is set to empty string, e.g. “”, the space used for displaying caption will be hidden, leaves only the column header, grid, and the footer. To display the caption without any text uses ” ” (without the quote).

Example

grid.set_caption('Orders Table')

  • « Go to Previous Page
  • 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