>>>Hi,
>>>
>>>I have a mmGridView which has a combobox in its edit template to allow the user to select an item from a list. This is the definition of the datasource that is supposed to give the combo the items that the user can select (or at least that's what I understand it is supposed to be doing, but could be completely wrong):
>>>
>>>
<asp:ObjectDataSource ID="odsRiders" runat="server" SelectMethod="GetRidersAndWaiversByPlan(this.oPolicy.Entity.PlanFK)"
>>> TypeName="SamaanSystems.IAS.Business.Plan"></asp:ObjectDataSource>
>>>
>>>
>>>I get this error:
>>>
>>>ObjectDataSource 'odsRiders' could not find a non-generic method 'GetRidersAndWaiversByPlan(this.oPolicy.Entity.PlanFK)' that has no parameters.
>>>
>>>This method does exist, so I guess my problem is how I am passing the parameters. How do I do this?
>>
>>Remove () from the SelectMethod and use SelectParameters to specify parameters.
>
>Thanks Naomi,
>
>if I try this:
>
>
<asp:ObjectDataSource ID="odsRiders" runat="server" SelectMethod="GetRidersAndWaiversByPlan" SelectParameters="this.oPolicy.Entity.PlanFK"
> TypeName="SamaanSystems.IAS.Business.Plan"></asp:ObjectDataSource>
>
>I get this error:
>
>The 'SelectParameters' property is read-only and cannot be set.
OK, I found some sample code on-line and this is what I can try:
<asp:ObjectDataSource ID="odsRiders" runat="server" SelectMethod="GetRidersAndWaiversByPlan"
TypeName="SamaanSystems.IAS.Business.Plan">
<selectparameters>
<asp:querystringparameter name="planPK" querystringfield="planpk" defaultvalue="-1" />
</selectparameters>
</asp:ObjectDataSource>
However, I am not using a querystring to pass in the value I need. I can access the value in the aspx.cs file like this: this.oPolicy.Entity.PlanFK
So how would I use that in the aspx file?