Creating your grid

A grid control is a display of a two-dimensional data set. For the control to display useful information, you need to tell the grid control what data on which it should work. In wxPython, there are two different mechanisms for handling data in a grid control, each of which handles adding, deleting, and editing the data in a slightly different manner.

■ The grid control can directly manage the values in each row and column.

■ The data can be managed indirectly using a grid table.

The simpler is to have the grid control manage the values directly. In this case, the grid maintains its own copy of the data. This can be awkward if there is a lot of data or if your application already has an existing grid-like data structure. If so, you can use a grid table to manage the data for the grid. See chapter 5 to review how grid tables can be thought of as a model in an MVC framework.

Was this article helpful?

0 0

Post a comment