asp:grid
2つのリストからフィルタリングした後、データをロードする必要がありますasp:dropdown
。たとえば、ドロップダウンリストは次のとおりです。
<asp:DropDownList ID="ddlb" runat="server" AutoPostBack="True"
CssClass="ddlb" Width="100px" DataSourceID="SqlDataSource3"
DataTextField="MonthYearName" DataValueField="MonthYear"
onselectedindexchanged="Changed">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ProdDB %>" SelectCommand="# some sql query">
</asp:SqlDataSource>
<asp:DropDownList ID="asd" runat="server" AutoPostBack="True"
CssClass="ddlb" Width="100px" DataSourceID="SqlDataSource4"
DataTextField="MonthYearName" DataValueField="MonthYear"
onselectedindexchanged="SelectedIndexChanged">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource4" runat="server"
ConnectionString="<%$ ConnectionStrings:ProdDB %>" SelectCommand="# some queries">
</asp:SqlDataSource>
今、私がページをロードしているとき。上記で定義したドロップダウンリストが表示されます。私が知りたいのは、「aspx grid
上記の2つのドロップダウンフィルターを使用してデータをロードするにはどうすればよいですか?」です。
たとえばA
、最初のドロップダウンからオプションを選択すると、それに基づいて結果がフィルタリングされ、データが表示さgrid
れます...
グリッドをこれらの2つのドロップダウンリストに接続する方法を教えてください。
どのようにフィルタリングすればよいですか?