J
JDC
Hi all,
I'm using ObjectDataSource to select & update records. I have a
"RecordDetails" class which encapsulates the row I want to update, and
so it contains the fields I want to update and also the key fields that
limit the update.
The runtime automatically fills in the updatable fields in my object
from a GridView, but I need to set the limit fields before the
UpdateMethod is called.
I thought this would be the correct approach:
protected void ObjectDataSource1_Updating(object sender,
ObjectDataSourceMethodEventArgs e)
{
e.InputParameters["KeyField"] = someValueFromViewState;
}
But this throws an "OrderedDictionary is readonly and cannot be
modified." error.
I guess I'm overlooking something obvious; can anyone tell me what?!?
Cheers, J
I'm using ObjectDataSource to select & update records. I have a
"RecordDetails" class which encapsulates the row I want to update, and
so it contains the fields I want to update and also the key fields that
limit the update.
The runtime automatically fills in the updatable fields in my object
from a GridView, but I need to set the limit fields before the
UpdateMethod is called.
I thought this would be the correct approach:
protected void ObjectDataSource1_Updating(object sender,
ObjectDataSourceMethodEventArgs e)
{
e.InputParameters["KeyField"] = someValueFromViewState;
}
But this throws an "OrderedDictionary is readonly and cannot be
modified." error.
I guess I'm overlooking something obvious; can anyone tell me what?!?
Cheers, J