My data for a PyGridTableBase grid come out of a postgres database,
and many fields are numeric(7,2) or smallint.
The corresponding grid columns have the appropriate cell editors.
After editing a numeric(7,2) cell, the cell shows the two decimal positions, OK.
However, in de underlying data the value of the edited cell is now a string.
Why is this ?
It seems so reasonable that the data type does not change.
And is there a built in mechanism that does the conversion
automa(t|g)ically for me ? Or do i have to write something myself ?
egbert bouwman
What exact cell editors are you using? Does your table class implement the methods like Can(G|S)etValueAs and (G|S)etValueAsDouble?
···
On 7/3/12 6:46 AM, Egbert Bouwman wrote:
My data for a PyGridTableBase grid come out of a postgres database,
and many fields are numeric(7,2) or smallint.
The corresponding grid columns have the appropriate cell editors.
After editing a numeric(7,2) cell, the cell shows the two decimal positions, OK.
However, in de underlying data the value of the edited cell is now a string.
Why is this ?
It seems so reasonable that the data type does not change.
And is there a built in mechanism that does the conversion
automa(t|g)ically for me ? Or do i have to write something myself ?
egbert bouwman