-
dropdown data issue within a repeater
I have a repeater where the data is filtered by a param in the querystring. In the repeater I have a dropdown that needs to only show the data based upon the filter I set up in the datasource. I have a section below the dropdown where I can hardcode the filter param (item_id) but I need that hardcoded part to dynamically pass in the current items value. Thanks for any assistance
<!-- Repeater -->
<asp:Repeater ID="QueryStringRepeater" runat="server" DataSourceID="CategoryFilterbyQueryStringObjectDataSource">
<itemtemplate>
<!-- Dropdown -->
<asp:DropDownList ID="SizeDropDownList" DataValueField="size" runat="server" DataSourceID="SizeFilterSqlDataSource">
</asp:DropDownList>
<%SizeFilterSqlDataSource.SelectParameters["item_id"].DefaultValue = "2"; %>
<!-- Here are my datasources-->
<asp:ObjectDataSource ID="CategoryFilterObjectDataSource" runat="server"
SelectMethod="GetSaleItemsbyCategory" TypeName="categoryfilterTableAdapters.saleitemsTableAdapter" OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:controlParameter ControlID="categoryDropDown" Name="category" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="CategoryFilterbyQueryStringObjectDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetSaleItemsbyCategory"
TypeName="categoryfilterTableAdapters.saleitemsTableAdapter">
<SelectParameters>
<asp:QueryStringParameter Name="category" QueryStringField="category" Type="String" DefaultValue="apparel" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:SqlDataSource ID="SizeFilterSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT sizes.size FROM saleitems INNER JOIN size_trans ON saleitems.item_id = size_trans.item_id INNER JOIN sizes ON size_trans.size_id = sizes.size_id WHERE (saleitems.item_id = @item_id)">
<SelectParameters>
<asp:Parameter DefaultValue="1" Name="item_id" />
</SelectParameters>
</asp:SqlDataSource>
-
Is there no one that can give any ideas on this? Do I need to build out some function or is there a simple way to grab the index of the dataset to pass to the dropdown????
Similar Threads
-
By saikiran_kris in forum Java
Replies: 0
Last Post: 03-14-2006, 01:21 PM
-
By VBWyrde in forum Security
Replies: 0
Last Post: 07-13-2001, 10:49 AM
-
By Tim Frost in forum xml.announcements
Replies: 0
Last Post: 04-02-2001, 10:53 AM
-
By Desmond Cassidy in forum authorevents.kurata
Replies: 3
Last Post: 04-19-2000, 03:54 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks