I have a gridview attached to an ObjectDataSource object that retrieves records from a database for display in a gridview. The procedure for returning records takes in the search bar and displays the corresponding results. However, when there are no results in the database, I get an empty gridview with page numbers at the bottom, as if it were returning all records from the database, as shown in the figure below:

I set the EmptyDataText and EmptyDataTemplate properties, but they do not appear when there are no results.
Does anyone know what is going on here?
Here's the asp for ObjectDataSource and GridView:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnablePaging="True" SelectCountMethod="GetUsersCount"
SelectMethod="GetUsers" SortParameterName="sortColumn" TypeName="WebsiteBuilder.Core.UUser"
OnSelecting="ObjectDataSource1_Selecting">
<SelectParameters>
<asp:Parameter Name="searchExpression" Type="String" DefaultValue="" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:GridView ID="grdUsers" runat="server" CssClass="grdUsers" AutoGenerateColumns="false"
OnDataBound="grdUsers_DataBound" DataSourceID="ObjectDataSource1" AllowPaging="true"
AllowSorting="true" OnRowCommand="grdUsers_RowCommand" PageSize="5" EmptyDataText="No Results">
<PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast"
PageButtonCount="5" Position="Bottom" />
<PagerStyle CssClass="pagination" HorizontalAlign="Center" VerticalAlign="Middle" />
<EmptyDataTemplate>No Results</EmptyDataTemplate>`
Here is the code to select the event:
protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
if (!String.IsNullOrEmpty(this.txtSearchBox.Text))
{
e.InputParameters["searchExpression"] = "%" + this.txtSearchBox.Text + "%";
}
else return;
}
And the code to retrieve the data:
cmd.AddParameter("searchExpression", searchExpression);
cmd.AddParameter("sortExpression", sortColumn);
cmd.AddParameter("startRowIndex", startRowIndex);
cmd.AddParameter("maximumRows", maximumRows);
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds);
DataTable dt = ds.Tables[0];
int i = dt.Rows.Count;
return ds.Tables[0];
debug, 0. , gridview EmptyDataTemplate , .