473,385 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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="CategoryFilterbyQueryStringObjectDat aSource">
<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.saleitemsTab leAdapter" 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.saleitemsTab leAdapter">
<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>
Nov 9 '06 #1
1 1432
Is there no one who has any ideas on this? Do I need to call a function or is there some way to grab the index of the current dataset?
Nov 12 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: mark | last post by:
My problem is I need to have a "nested" repeater. I have an array which I load into a hashtable - that part works great. I can setup the second repeater to work just fine, as long as it's not...
1
by: VIswanathan S | last post by:
Hi All! How to use Data Repeater in VB.NET? Data Fields are Employee Number Name Photo Date of Joining Salary
0
by: Jeff | last post by:
After I bind the repeater control in the form_load event, it builds multiple lines based on the number of rows in the dataset. In the repeater control, I have a textbox and a dropdown list box. ...
0
by: Darren Clark | last post by:
Is it possible to nest a drop down list in a repeater? (also the repeater has a nested repeater) The code i am using looks like.... i get an error saying that Exception Details:...
8
by: darrel | last post by:
*sigh*...I've asked this before, but have long forgotten the answer. In the past, I'd often use repeater controls, bind data to it, and then reference the data fields from within the repeater: ...
1
by: Don Parker | last post by:
I want to have 2 dropdowns - one containing categories of items such as Furniture, Applicances etc. The other dropdown is a list of subcategories that match the first drop down. So if the user...
11
by: J055 | last post by:
Hi I have a dropdown control which is constructed in another dropdown control SelectedIndexChanged event protected void ddlParamType_SelectedIndexChanged(object sender, EventArgs e) { //...
13
by: Shutey | last post by:
I have a strange issue with dropdowns. Using php4, mySQL5, Apache 2 on a fast XP pro PC, I have a form which requires 5 dropdowns populated with indentical values. I extract the values using SQL...
1
by: =?Utf-8?B?U3Rvcm1icmluZ2Vy?= | last post by:
I have an UpdatePanel with a dropdown list that I can't seem to get to update. It has a hidden button which I click from javascript added to the page when another update panel is updated. Triggers...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.