G
Guest
I am displaying data from a web service in a DataGrid, using an
ObjectDataSource. Retrieving and displaying data is working fine, but there
is a problem using Edit mode in the GridView. If my GridView contains
columns that correspond exactly to the input parameters for the UpdateMethod
of the ObjectDataSource, then everything works. However, there are some
columns in the DataGrid that should be invisible or read-only. When I set
the Visible attribute of the BoundColumn to true, the column value is not
sent in the web service request for the UpdateMethod.
Here is the web service request body when my SubjectID column is visible:
<UpdateBalanceInput xmlns="urn:schemas-kronos-com:wsdl">
<SubjectID xmlns="">2</SubjectID>
<BalanceTypeID xmlns="">1</BalanceTypeID>
<Quantity xmlns="">2</Quantity>
<Unit xmlns="">Days</Unit>
<Operation xmlns="">reset</Operation>
</UpdateBalanceInput>
And here's the request after setting the Visible attribute of the bound
column to false (because its value is selected from another control):
<UpdateBalanceInput xmlns="urn:schemas-kronos-com:wsdl">
<BalanceTypeID xmlns="">1</BalanceTypeID>
<Quantity xmlns="">0</Quantity>
<Unit xmlns="">Days</Unit>
<Operation xmlns="">reset</Operation>
</UpdateBalanceInput>
Can anyone tell me why making a bound column invisible causes the
ObjectDataSource to omit its value, so that the web service call is missing a
parameter? Is there any workaround?
Thanks,
Dennis
ObjectDataSource. Retrieving and displaying data is working fine, but there
is a problem using Edit mode in the GridView. If my GridView contains
columns that correspond exactly to the input parameters for the UpdateMethod
of the ObjectDataSource, then everything works. However, there are some
columns in the DataGrid that should be invisible or read-only. When I set
the Visible attribute of the BoundColumn to true, the column value is not
sent in the web service request for the UpdateMethod.
Here is the web service request body when my SubjectID column is visible:
<UpdateBalanceInput xmlns="urn:schemas-kronos-com:wsdl">
<SubjectID xmlns="">2</SubjectID>
<BalanceTypeID xmlns="">1</BalanceTypeID>
<Quantity xmlns="">2</Quantity>
<Unit xmlns="">Days</Unit>
<Operation xmlns="">reset</Operation>
</UpdateBalanceInput>
And here's the request after setting the Visible attribute of the bound
column to false (because its value is selected from another control):
<UpdateBalanceInput xmlns="urn:schemas-kronos-com:wsdl">
<BalanceTypeID xmlns="">1</BalanceTypeID>
<Quantity xmlns="">0</Quantity>
<Unit xmlns="">Days</Unit>
<Operation xmlns="">reset</Operation>
</UpdateBalanceInput>
Can anyone tell me why making a bound column invisible causes the
ObjectDataSource to omit its value, so that the web service call is missing a
parameter? Is there any workaround?
Thanks,
Dennis