Skip to main content

Summary

Table view rendered using the SlickGrid library.

SlickGrid is an advanced JavaScript grid/spreadsheet component.

This view accepts any non-empty rset. It uses introspection on the result set to compute column names and the proper way to display the cells.

It is highly configuration and accepts the same wealth of option than cubicweb.web.view.tableview.RsetTableView.

Example

To try it at the speed of light

Once your instance is running you can go to:

http://localhost:8080/view?rql=Any L, X WHERE X is CWUser, X login L&vid=slickgrid

That’s all. The rendered table uses the ‘slickgrid’ view.

Calling the slidgrid from your views

The simplest way is to call:

self._cw.wview('slickgrid', rset, 'null')

Options can be specified by class attributes:

  • displaycols, if not None, should be a list of rset’s columns to be displayed.

  • headers, if not None, should be a list of headers for the table’s columns. None values in the list will be replaced by computed column names.

  • cellvids, if not None, should be a dictionary with table column index as key and a view identifier as value, telling the view that should be used in the given column.

As well as SlickGrid specific option:

  • columns_options: a dictionary of SlickGrid column options

One can use:

class MyRsetGridView(RsetGridView):
    __regid__ = 'myslickgrid'
    headers = (_('first'), _('second'), _('third'))
    cellvids = {0: 'text', 1: 'inline', 2:'outofcontext'}
    columns_options = {0: {'sortable': False}}

self._cw.wview('myslickgrid', rset, 'null')

Note that the pagination is not working yet.

Release files for cubicweb-slickgrid 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cubicweb-slickgrid 1.3.1
File Size Uploaded
cubicweb-slickgrid-1.3.1.tar.gz 194.6 kB Details

Release files / cubicweb-slickgrid-1.3.1.tar.gz

Download URL cubicweb-slickgrid-1.3.1.tar.gz
Size 194.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bfe370e73029c84dd06a31d93e55837bfe68092910705e94eeb2eef38449313e
BLAKE2b-256 checksum
How to use checksums
f8711809e0d6b07788d512ae5fff8773805f06c6d2ffcc5a4bca62ae92a0cd30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

1.3.1 This release

1 release file

1.3.0

2 release files

1.2.3

1 release file

1.2.2

3 release files

1.2.1

1 release file

1.2.0

2 release files

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page