S
Steven Nagy
Hi,
I am painfully aware of the fact that with a GridView bound to an
ObjectDataSource that if you have a hidden grid column (visible=false)
then it does not post back that field to your objectdatasource for
update/insert/etc.
The workaround I have found is to include all your field names in the
DataKeys attribute, and this forces all information about an object to
be called against your object Update command. But to me, this is a bit
smelly.
Is this the best solution? Is there a better way to handle this?
What happens when I want to specify a second ObjectDataSource who's
select method uses the ID of the selected row in the GridView (which
uses the DataKey property) ?
Cheers,
Steven
I am painfully aware of the fact that with a GridView bound to an
ObjectDataSource that if you have a hidden grid column (visible=false)
then it does not post back that field to your objectdatasource for
update/insert/etc.
The workaround I have found is to include all your field names in the
DataKeys attribute, and this forces all information about an object to
be called against your object Update command. But to me, this is a bit
smelly.
Is this the best solution? Is there a better way to handle this?
What happens when I want to specify a second ObjectDataSource who's
select method uses the ID of the selected row in the GridView (which
uses the DataKey property) ?
Cheers,
Steven