DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    2

    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>
    &nbsp;
    <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>

  2. #2
    Join Date
    Nov 2006
    Posts
    2
    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

  1. Dropdown Issue
    By saikiran_kris in forum Java
    Replies: 0
    Last Post: 03-14-2006, 01:21 PM
  2. Hailstorm and the Trust Issue
    By VBWyrde in forum Security
    Replies: 0
    Last Post: 07-13-2001, 10:49 AM
  3. Data Junction Announces XML Junction 7.51
    By Tim Frost in forum xml.announcements
    Replies: 0
    Last Post: 04-02-2001, 10:53 AM
  4. Complex Data Consumer Data Aware Classes
    By Desmond Cassidy in forum authorevents.kurata
    Replies: 3
    Last Post: 04-19-2000, 03:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links