グリッドビューがあり、特定の文字列を検索すると、フィルター処理された結果が並べ替えられますが、代わりにグリッドビューにすべての並べ替えが表示され、フィルター処理された結果が失われます。何か案は?
ASP:
<asp:GridView ID="GridViewWinners" runat="server" AutoGenerateColumns="False"
CellPadding="4" DataKeyNames="PlayerID" DataSourceID="SqlDataSource4" ForeColor="#333333"
GridLines="Horizontal" Width="858px"
onselectedindexchanged="GridViewWinners_SelectedIndexChanged"
AllowSorting="True" Visible="False">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="PlayerID" HeaderText="PlayerID" ReadOnly="True"
SortExpression="PlayerID" Visible="False" />
<asp:BoundField DataField="LastName" HeaderText="Last Name"
SortExpression="LastName" />
<asp:BoundField DataField="FirstName" HeaderText="First Name"
SortExpression="FirstName" />
<asp:BoundField DataField="UserName" HeaderText="Login"
SortExpression="UserName" />
<asp:BoundField DataField="ClubNumber" HeaderText="Club Number"
SortExpression="ClubNumber" />
<asp:BoundField DataField="DOB" HeaderText="DOB" SortExpression="DOB" />
</Columns>
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource4" runat="server"
ConnectionString="<%$ ConnectionStrings:GameCenterPrizesConnectionString1 %>"
DeleteCommand="DELETE FROM [Players] WHERE [PlayerID] = @PlayerID"
InsertCommand="INSERT INTO [Players] ([UserName], [ClubNumber], [FirstName], [LastName], [DOB]) VALUES (@UserName, @ClubNumber, @FirstName, @LastName, @DOB)"
ProviderName="<%$ ConnectionStrings:GameCenterPrizesConnectionString1.ProviderName %>"
SelectCommand="SELECT [PlayerID], [UserName], [ClubNumber], [FirstName], [LastName], [DOB] FROM [Players]"
UpdateCommand="UPDATE [Players] SET [UserName] = @UserName, [ClubNumber] = @ClubNumber, [FirstName] = @FirstName, [LastName] = @LastName, [DOB] = @DOB WHERE [PlayerID] = @PlayerID">
<DeleteParameters>
<asp:Parameter Name="PlayerID" Type="Int64" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="UserName" Type="String" />
<asp:Parameter Name="ClubNumber" Type="String" />
<asp:Parameter Name="FirstName" Type="String" />
<asp:Parameter Name="LastName" Type="String" />
<asp:Parameter Name="DOB" Type="DateTime" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="UserName" Type="String" />
<asp:Parameter Name="ClubNumber" Type="String" />
<asp:Parameter Name="FirstName" Type="String" />
<asp:Parameter Name="LastName" Type="String" />
<asp:Parameter Name="DOB" Type="DateTime" />
<asp:Parameter Name="PlayerID" Type="Int64" />
</UpdateParameters>
</asp:SqlDataSource>