Firstly thanks John for pointing me in the right direction
So far I have managed to get assign a drop down box (ValueMode = 'key')
as the Editor for a column in my grid and populate it with choices and
keys from my database
However I have a number of issues
1) The grid column shows the "key" and only changes to a dropdownlist
when selected. So I tried to assign the same class to the
CustomRendererClass (and also the base class dabo.ui.dDropdownList) as I
had used for the Editor class. Both produced an error of the type below
Traceback (most recent call last):
File
"/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line
14614, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File
"/usr/local/lib/python2.6/dist-packages/Dabo-0.9.2-py2.6.egg/dabo/ui/uiwx/dPemMixin.py",
line 330, in _afterInitAll
self.afterInitAll()
File "/tmp/tmpwqAzvM.py", line 145, in afterInitAll
acol.CustomRendererClass = keycol
File
"/usr/local/lib/python2.6/dist-packages/Dabo-0.9.2-py2.6.egg/dabo/ui/uiwx/dGrid.py",
line 906, in _setCustomRendererClass
self._updateRenderer()
File
"/usr/local/lib/python2.6/dist-packages/Dabo-0.9.2-py2.6.egg/dabo/ui/uiwx/dGrid.py",
line 775, in _updateRenderer
renderer = rendClass()
TypeError: __init__() takes at least 2 arguments (1 given)
The dDropdownList produced the same final error but at a different place
in the code
I can find no equivalent to makeGridEditor for the renderer
2) Although the choices and keys used will update the record when used
in a dropdownlist on the form no update takes place when an item is
selected from the dropdown in the grid. All fields are marked as
editable
3) For some reason adding the CustomEditorClass slows everything in the
grid down to a snails pace. The form takes about 45 seconds to load and
changing rows in the grid takes 30 seconds ? Any thoughts.
Also having run the form several times the whole Classdesigner go slow
in the area of saving and accessing menus?
4) < None > values When the key field is empty the cell shows < None >
trying to select the cell produces the following error
Traceback (most recent call last):
File
"/usr/local/lib/python2.6/dist-packages/Dabo-0.9.2-py2.6.egg/dabo/ui/uiwx/__init__.py",
line 1265, in BeginEdit
self._control.Value = self.startValue
File
"/usr/local/lib/python2.6/dist-packages/Dabo-0.9.2-py2.6.egg/dabo/ui/uiwx/dControlItemMixin.py",
line 380, in _setValue
self.KeyValue = value
File
"/usr/local/lib/python2.6/dist-packages/Dabo-0.9.2-py2.6.egg/dabo/ui/uiwx/dControlItemMixin.py",
line 239, in _setKeyValue
raise ValueError(_("Trying to set %s.Value to these invalid
selections: %s") % (self.Name, invalidSelections))
ValueError: Trying to set keycol.Value to these invalid selections: [u'<
None >'
How can these empty values be handled both to set to another value and
to set to empty . It appears as if the dropdownlist is picking up the
displayed string value rather than the DataField?
Any help will be greatly appreciated.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/1259901500.11226.25.ca...@linux