Hi!
I'm still foreign to wxPython, specifically wxPyGridTableBase, I've
read the wikis, and I still don't get or understand the SetValue
method, what I what I want from my grid is for only insert purposes to
the database, so initially my data for the GetValue would be data =
[ ], my problem, is how to manipulate the SetValue, so that my initial
data variable, would have items, for me to insert to the database,
examples on the wiki is that they just set the SetValue to pass, which
makes it read-only, I've read dabo but I'm still a newb, so I want to
achieve the same functionality as the pgadmin, but without the viewing
purposes. A simple example would be appreciated.
SetValue is for setting values of existing cells, it won't add rows to the table for you, it's something you have to do explicitly.
Few months ago I have started a project to make a class that does this in a general way so it can be easily reused. It does this by pretending that the number of rows is larger than it actually is by one, then if the SetValue method detects you are setting a value in that last extra row it inserts a new row.
You can find the project here:
https://bitbucket.org/raz/wxexpandogrid/src
Cheers
ยทยทยท
On Sat, 01 Oct 2011 00:21:28 +0200, karentinedo <kareen.tinedo@gmail.com> wrote:
Hi!
I'm still foreign to wxPython, specifically wxPyGridTableBase, I've
read the wikis, and I still don't get or understand the SetValue
method, what I what I want from my grid is for only insert purposes to
the database, so initially my data for the GetValue would be data =
, my problem, is how to manipulate the SetValue, so that my initial
data variable, would have items, for me to insert to the database,
examples on the wiki is that they just set the SetValue to pass, which
makes it read-only, I've read dabo but I'm still a newb, so I want to
achieve the same functionality as the pgadmin, but without the viewing
purposes. A simple example would be appreciated.