473,662 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dropdown data issue within a repeater

2 New Member
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="QueryString Repeater" runat="server" DataSourceID="C ategoryFilterby QueryStringObje ctDataSource">
<itemtemplate >
<!-- Dropdown -->
<asp:DropDownLi st ID="SizeDropDow nList" DataValueField= "size" runat="server" DataSourceID="S izeFilterSqlDat aSource">
</asp:DropDownLis t>
<%SizeFilterSql DataSource.Sele ctParameters["item_id"].DefaultValue = "2"; %>


<!-- Here are my datasources-->

<asp:ObjectData Source ID="CategoryFil terObjectDataSo urce" runat="server"
SelectMethod="G etSaleItemsbyCa tegory" TypeName="categ oryfilterTableA dapters.saleite msTableAdapter" OldValuesParame terFormatString ="original_{0}" >
<SelectParamete rs>
<asp:controlPar ameter ControlID="cate goryDropDown" Name="category" PropertyName="S electedValue" Type="String" />
</SelectParameter s>
</asp:ObjectDataS ource>
<asp:ObjectData Source ID="CategoryFil terbyQueryStrin gObjectDataSour ce" runat="server" OldValuesParame terFormatString ="original_{ 0}" SelectMethod="G etSaleItemsbyCa tegory"
TypeName="categ oryfilterTableA dapters.saleite msTableAdapter" >
<SelectParamete rs>
<asp:QueryStrin gParameter Name="category" QueryStringFiel d="category" Type="String" DefaultValue="a pparel" />
</SelectParameter s>
</asp:ObjectDataS ource>
&nbsp;
<asp:SqlDataSou rce ID="SizeFilterS qlDataSource" runat="server" ConnectionStrin g="<%$ ConnectionStrin gs:ConnectionSt ring %>"
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)">
<SelectParamete rs>
<asp:Paramete r DefaultValue="1 " Name="item_id" />
</SelectParameter s>
</asp:SqlDataSour ce>
Nov 9 '06 #1
1 1444
mwhitlatch
2 New Member
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
1759
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 nested within the first repeater. If it is nested within the first repeater, I don't get any data. If I put the second repeater as a separate repeater, not nested, it works fine. Here's my actual code, showing data pulled from the array within a...
1
2002
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
1637
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. I have tied the "SelectedIndexChanged" to it. At runtime - after I change the dropdown box selection, I'm only able to view the values of the controls within that one repeater instance. After the dropdown selection is changed, I need to...
0
1159
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: System.Web.HttpException: DataBinder.Eval: 'System.Data.DataRow' does not contain a property with the name topic. If i remove the dropdown list code it works fine... Any ideas? <asp:Repeater ID="SectionRepeater" Runat="server">
8
2375
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: <%# DataBinder.Eval(Container.DataItem, "agentMobilePhone") %> More recently, I've been doing more of the building on the codebehind side, creating a string builder and building the table from there. When doing that, I access the data like this:
1
1217
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 chooses Furniture - the 2nd dropdown will show Bed, Sofa etc - or if they choose applicances they will see refrigerator, range, dryer etc. What is the best way to do that? I was thinking to use a dataset a view and just filter the view and bind...
11
36967
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) { // some other code DropDownList ddlGroups = new DropDownList(); ddlGroups.SelectedIndexChanged += new
13
2188
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 and populate 2 variables and use a for-next loop to create the dropdown. The dropdown contains some 310 items! It works beautifully if I have 1 or 2 dropdowns but as soon as I add more it partially creates the 3rd and just stops until it times out!...
1
3193
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 didn't work for this that is why I'm using the script. The script is registered with... ScriptManager.RegisterStartupScript(Page, GetType(), "Update", String.Format("$get('{0}').click();", buttontoclick.ClientID), true); <asp:UpdatePanel...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8546
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5654
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.