U
Urs Eichmann
Hello,
My GridView is bound to an ObjectDataSource for select / update /
insert. Everything basically works as expected.
However, in the following scenario there is a problem:
My entity "Customer" consisits of three properties, "id", "Name" and
"City". These are all being displayed in the GridView.
Now I add a fourth Property "State" to the custom entity, which is
being used elsewhere. It is not being displayed in the grid.
Now, every time the "Customer" entity is being updated from my
GridView, the State property is being reset to the default value! Only
if I add a bound column for the "State" property to the grid (could be
invisible), the value is actually left as it was.
This is very dangerous and means, that if somebody adds a new Property
to the Customer entity, she/he has to remember to update all the
GridViews in the entiry application with the new property. This can't
be the ultimate solution?!
How can I prevent this behaviour?
Thanks for any help,
Urs
My GridView is bound to an ObjectDataSource for select / update /
insert. Everything basically works as expected.
However, in the following scenario there is a problem:
My entity "Customer" consisits of three properties, "id", "Name" and
"City". These are all being displayed in the GridView.
Now I add a fourth Property "State" to the custom entity, which is
being used elsewhere. It is not being displayed in the grid.
Now, every time the "Customer" entity is being updated from my
GridView, the State property is being reset to the default value! Only
if I add a bound column for the "State" property to the grid (could be
invisible), the value is actually left as it was.
This is very dangerous and means, that if somebody adds a new Property
to the Customer entity, she/he has to remember to update all the
GridViews in the entiry application with the new property. This can't
be the ultimate solution?!
How can I prevent this behaviour?
Thanks for any help,
Urs