M
miky
Hi,
I'm trying to get custom gridview paging working and I'm getting the
following error:
"ObjectDataSource 'ObjectDataSource1' could not find a non-generic
method 'count' that has parameters: p_TableName, p_OrderBy, p_MaxRows,
p_PageNum, p_StartRowIndex."
I have a gridview associated to an ObjectDataSource and the
ObjectDataSource is declared in the aspx file as follows:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
TypeName="LookupData"
SelectCountMethod="count" SelectMethod="selectMFPSData"
MaximumRowsParameterName="p_MaxRows"
SortParameterName="p_OrderBy" EnablePaging="True"
StartRowIndexParameterName="p_StartRowIndex">
<SelectParameters>
<asp:ControlParameter ControlID="lstMFPSTABLES"
Name="p_TableName" PropertyName="SelectedValue"
Type="String" />
<asparameter Name="p_OrderBy" Type="String" />
<asparameter Name="p_MaxRows" Type="Int32" />
<asparameter Name="p_PageNum" Type="Int32" />
<asparameter Name="p_StartRowIndex" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
The thing I don't understand is the "count" method the error refers to
is the method I've declared in the ObjectDataSource for the
SelectCountMethod property. The parameter list listed in the
declaration (in the <SelectParameters> hive) was generated when I
configured the ObjectDataSource to get a select parameter from a
control (a dropdownlist called lstMFPSTABLES).
So, a couple of questions:
1. Why is it erroring out on the count method, when the parameters are
meant for the select method?
2. Is it possible to parameterize the count method? This ability
would help in certain cases.
Thanks in advance for your help,
miky
I'm trying to get custom gridview paging working and I'm getting the
following error:
"ObjectDataSource 'ObjectDataSource1' could not find a non-generic
method 'count' that has parameters: p_TableName, p_OrderBy, p_MaxRows,
p_PageNum, p_StartRowIndex."
I have a gridview associated to an ObjectDataSource and the
ObjectDataSource is declared in the aspx file as follows:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
TypeName="LookupData"
SelectCountMethod="count" SelectMethod="selectMFPSData"
MaximumRowsParameterName="p_MaxRows"
SortParameterName="p_OrderBy" EnablePaging="True"
StartRowIndexParameterName="p_StartRowIndex">
<SelectParameters>
<asp:ControlParameter ControlID="lstMFPSTABLES"
Name="p_TableName" PropertyName="SelectedValue"
Type="String" />
<asparameter Name="p_OrderBy" Type="String" />
<asparameter Name="p_MaxRows" Type="Int32" />
<asparameter Name="p_PageNum" Type="Int32" />
<asparameter Name="p_StartRowIndex" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
The thing I don't understand is the "count" method the error refers to
is the method I've declared in the ObjectDataSource for the
SelectCountMethod property. The parameter list listed in the
declaration (in the <SelectParameters> hive) was generated when I
configured the ObjectDataSource to get a select parameter from a
control (a dropdownlist called lstMFPSTABLES).
So, a couple of questions:
1. Why is it erroring out on the count method, when the parameters are
meant for the select method?
2. Is it possible to parameterize the count method? This ability
would help in certain cases.
Thanks in advance for your help,
miky