D
DummyDumb
Hi,
I've got a Gridview utilizing a filterexpression:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
OnDeleted="ItemDeleted"
EnableCaching="true" SqlCacheDependency="APP_TIMESHEET:AB"
CacheKeyDependency="AB"
SelectMethod="GetABs" TypeName="RetrieveABData" DeleteMethod="DeleteAB"
......... filterexpression="ID ='{0}' AND Status ='{1}'"
OnFiltering="ObjectDataSource1_Filtering">
<filterparameters>
<asp:controlparameter name="ID" ControlID="tbxSelAB" PropertyName="Text"
defaultvalue="" />
<asp:controlparameter name="Status" ControlID="ddlFilterStatus"
PropertyName="SelectedValue" defaultvalue="" />
</filterparameters> ......
where TbxSelAB is a TextBox and ddlFilterStatus is a DropDownList.
The corresponding Database columns are both of type integer. Applying the
above filter results in an error as both parameters are of type string. Is
there any way to make a type conversion in the filterexpression?
Thank you very much,
DD
I've got a Gridview utilizing a filterexpression:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
OnDeleted="ItemDeleted"
EnableCaching="true" SqlCacheDependency="APP_TIMESHEET:AB"
CacheKeyDependency="AB"
SelectMethod="GetABs" TypeName="RetrieveABData" DeleteMethod="DeleteAB"
......... filterexpression="ID ='{0}' AND Status ='{1}'"
OnFiltering="ObjectDataSource1_Filtering">
<filterparameters>
<asp:controlparameter name="ID" ControlID="tbxSelAB" PropertyName="Text"
defaultvalue="" />
<asp:controlparameter name="Status" ControlID="ddlFilterStatus"
PropertyName="SelectedValue" defaultvalue="" />
</filterparameters> ......
where TbxSelAB is a TextBox and ddlFilterStatus is a DropDownList.
The corresponding Database columns are both of type integer. Applying the
above filter results in an error as both parameters are of type string. Is
there any way to make a type conversion in the filterexpression?
Thank you very much,
DD