ui_categories.py 1.55 KB
Newer Older
1
# -*- coding: utf-8 -*-
2
""" categories widgets
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('categories')
23
gridModifier.configure(plugins=['pGridPaging', 'pMathJax'])
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

gridModifier.configure_column('code', width=10)
gridModifier.set_rownumbering(True)

gridModifier.append_filter(('code', 'contains', T('bla bla...')))

gridModifier.configure_filters(plugins=['pFormToolTip'], width=300)
gridModifier.configure_gridWithFilter(selectorTitle= 'MyFoo')

#
# Example of buffered rendering
# In that case the full store is loaded but only few row are rendered in the grid
#
# plugin = dict(ptype='bufferedrenderer',
#               leadingBufferZone=0,
#               trailingBufferZone=0)
# gridModifier.append_plugins(plugin)
41 42 43 44 45 46 47 48 49 50 51

#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
# example of buffered store
#
# storeModifier = dbui.StoreModifier('categories')
# storeModifier.set_buffered()