CustomDataTable gridcell validator

Hi,

A 2 column grid table's type was defined the following way:

self.dataTypes = [gridlib.GRID_VALUE_CHOICE+:Phone,Fax,Age,Notice",
gridlib.GRID_VALUE_STRING]

Is it possible to bind a validator to the second column gridcells that
depends on the value of the first column chosen by the user? I mean if
the user chooses the value 'Phone' in the first column cell a
phone_number_validator should be bound if the 'Age' is choosen a
number_only_validator should be applied, etc...
Is it a possible solution to create a custom renderer?

Peter

···

--
  Peter Abraham
  abraham_peter@fastmail.fm

--
http://www.fastmail.fm - Choose from over 50 domains or use your own

Peter Abraham wrote:

Hi,

A 2 column grid table's type was defined the following way:

self.dataTypes = [gridlib.GRID_VALUE_CHOICE+:Phone,Fax,Age,Notice",
gridlib.GRID_VALUE_STRING]

Is it possible to bind a validator to the second column gridcells that
depends on the value of the first column chosen by the user? I mean if
the user chooses the value 'Phone' in the first column cell a
phone_number_validator should be bound if the 'Age' is choosen a
number_only_validator should be applied, etc...

No,

Is it a possible solution to create a custom renderer?

The renderer just draws the cell, what you want to do is use a custom cell editor.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!