"Large" wxGrid Question

Hello NG,

      in my application, I work with a medium-large grid (that has 9 column
and may have 500-1000-1500 rows, or more). This grid contains different
editors/renderers, depending on the column, and different string font
styles.
When the application draws the grid, the user has the possibility to
"filter" some of the rows (depending on certain filtering criteria) and
display only them. Then, he can remove the filter and the grid should be
redisplayed entirely as it was in the beginning.
Now, what I am doing now (supposing that "self" is my grid) is something
like:

self.ClearGrid()

counter = 0
for columns in range(9):
      for rows in range(len(self.numberofrows):
            if FilterIsOK:
                  self.SetCellValue(counter, columns, somevalue)

Is there a more efficient way to handle this "filtering" things? Does
anyone of you have a suggestion on how to handle (and display/render)
faster a large grid?

Thank you for every suggestion.

Andrea.

···

------------------------------------------------------------------------------------------------------------------------------------------
Message for the recipient only, if received in error, please notify the
sender and read http://www.eni.it/disclaimer/

Take a look at the wxGrid. Both of those virtualize the grid by keeping the data in a separate table and do not require the grid to be recreated explicitly when display options change.

Also, check these two pages on the wiki

  <http://wiki.wxpython.org/index.cgi/wxPyGridTableBase?action=highlight&value=wxGrid&gt;

  <http://wiki.wxpython.org/index.cgi/UpdatingGridData&gt;

/Jean Brouwers

PS) We use several wxGrid instances, all sharing the same table of several 1,000 rows of data. Each wxGrid instance is kept in a separate tab of a notebook and offers a different view of the same table data.

···

andrea.gavana@agip.it wrote:

Hello NG,

     in my application, I work with a medium-large grid (that has 9 column
and may have 500-1000-1500 rows, or more). This grid contains different
editors/renderers, depending on the column, and different string font
styles.
When the application draws the grid, the user has the possibility to
"filter" some of the rows (depending on certain filtering criteria) and
display only them. Then, he can remove the filter and the grid should be
redisplayed entirely as it was in the beginning.
Now, what I am doing now (supposing that "self" is my grid) is something
like:

self.ClearGrid()

counter = 0
for columns in range(9):
     for rows in range(len(self.numberofrows):
           if FilterIsOK:
                 self.SetCellValue(counter, columns, somevalue)

Is there a more efficient way to handle this "filtering" things? Does
anyone of you have a suggestion on how to handle (and display/render)
faster a large grid?

Thank you for every suggestion.

Andrea.
------------------------------------------------------------------------------------------------------------------------------------------
Message for the recipient only, if received in error, please notify the
sender and read E-mail Disclaimer

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org