what changed do I need to make to my code for it to achieve what I'm after.
At the moment I am getting a "cannot cast to type" error message with the below code.
I have also tried calling the ItemDataBound method in with the parent repeater tags and had no errors but when I clicked on the button it would just move back to the top of the page and would not hide or show any data. Also I have made the div style to none but the first record still shows its child but the rest don't.
I'm having a problem trying to retrieve a dropdownlist value that is located within a nested repeater. Basically I'm trying to create a shopping cart that allows the user to select a shipping method and the shipping method is contained in the repeater. So my page structure looks something like this.
To me this should work, but the problem I'm facing is that there are no repeater items. The Items.Count property in the repeater is 0. I am not calling DataBind on the Gridview nor the Repeater before this code is reached (this code is the first thing that happens in my button click event) and my binding is done inside a !IsPostBack statement in my page load. I've made sure databinding is not occurring by setting breakpoints on the code that databinds both the gridview and repeater.
It seems to me like the nested repeater is losing it's viewstate or something on a postback. If that's the case, how can I get the selected value of that dropdown control inside a nested repeater?
i been googling this issue for past 3 or 4 days. I couldnt get any solution so far. I am working on forum where members can post comments based on a submitted report. Im using nested repeater inside an update panel. The nested repeater contains 4 repeaters, which binds during pageload for the first time. The inner most repeater holds a linkbutton for adding comment and set it with the itemCommand event of the inner most repeater. But when i click "Add Comment", its not firing itemCommand Event, though page getting postback. Please go through my code. I've removed all asps, so that it would much readable.
I am trying to follow this tutorial(out of date) but the simplest I can find and understand to put a repeater or datagrid inside of a datalist.http://www.tutorialized.com/view/tutorial/DataGrid-inside-a-DataGrid/13926I get hung up in the cs part. Can I just add a sql datasource to the aspx page then call it from the cs like this somehow...my
Could anyone let me know the main use of repeater, because from what I have understood by doing some search online is that we can use this to show data that we want to be repeated for every field produced for instance in a DataList if the repeater is part of a DataList.
I have an order page in my website and in this page I have used a Datalist and a repeater within th Datalist. However the problem which I have is that the content of the Datalist display as they should, however the content within the repeater control do not show up in the page.
In the repeater control I have a linkbutton, and what I to do is to show the linkbutton for every field (every item), however for some reason when I run the page the linkbutton is not actually shown.
The code below is the code which I have on this page.
note that in the code for object datasource I used the BLL (Business Logic Layer) which I created. I also created DAL (Data Access Layer) before being able to create the BLL.
Is there a better, cleaner way to do this in ASP.NET 2.0?
An ASP.NET 2.0 page displays a datalist of records. Each record can have many dates, so the dates are in a nested gridview (I chose a gridview over a datalist here because we want to be able to delete a date and this is easier done in a gridview). The parent record can never be deleted.
The display works fine: the nested gridview gets its datasource during the parent datalist's OnItemDataBound event.
The problem: the nested gridview's delete function. The date gets deleted without a problem (handled in the OnRowDeleting event), but somehow the redisplay is untying all the other nested gridviews from their datasources. The delete does not appear to cause a page postback, so I don't know how the other nested gridviews are losing their datasources.
The above does not throw any compile errors but it does not work correctly.
accParent produces 6 headings, the first with 3 children, the second with 3 children, the other four each with one child.
The accordion hides the Times and Locations (showme panel) from the first accChild item in the first heading, which is incorrect as there are records to display, but does not hide the panel from the accChild of the last two headings, where there isn't any data to display.
I have a user control that displays a shopping cart in an ecommerce application.
The main cart display is a repeater that renders as a html table. In one of those table columns, there is another repeater to display people associated with the products int he cart (it's a repeater in case there is a line item >1 with multiple people).
I've added an ImageButton that I want to use to change the person associated with the item. At first, when I'd click on it I was getting this error:
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
So as an experiment I disabled EventValidation on the page (not the control it's self) and now I do not get an error, but I also do not ever hit the breakpoint I set in the innermost repeater's ItemCommand event.
So I wonder how I might do this without disabling EventValidation, because this control will show up on multiple pages and we don't want to edit them all. Also, I'll need to know not only the repeater containing the control's row that the event came from but also the row index of the repeater containg this one. Is this possible?
The user control consists of a repeater which has a objectdatasource connected to a table called collections. Inside the ItemTemplate of the first repeater am using another repeater which has another objectdatasource connected to a table called subcollections.
I am totally conused as to how I can make it.. The objective is that when I click the items of the first repeater, ((ie)) When I click a collection in the irst repeater, I should get the subcollections in the second repeater.
Users can reply to a comment made in the parent repeater by clicking a link that opens a popup that inserts a row in the replies table. This is then displayed in the repeater as soon as the lists refresh. What I need to do is have a Delete comment link that only the user that inserted the reply can utilize. How do you get the command or onclick from a ImageBUtton that is in the child segment?
The Enabled='<%# isEnabled() %>' disables the button foe users that are not logged in...that seems to work OK
1. I have my primary object collection (ProductGroups) - these are basically "friendly groupings of products"
2. I have a collection of Objects (Products) in each ProductGroup object
3. I have yet more collections of objects inside each Product Object
I cannot access parent data from a child object, once I'm somewhere in the nest - Let's just say, I'm in the second level of nesting, displaying Products from the ProductGroup. I would really, really like to know which ProductGroup I'm inside. But I can't figure out how to access the row's parent data
I've poured through the forums, ect, trying to find an answer to this. Below are some things I've tried.
I have a presentation to the CFO in two hours. I can't get a nested repeater control to work right, something to do with teh placement of the <table> tags I think.The first repeater first section works fine, then the child repeater shows the first child section right, but the next section of the parent repeater loses all the formatting applied at the parent table. I've tried vaious permutations of where to place the closing table tag of the outer and the inner and get different results, but never the right results.
I have two level data control in a web form, the parent one is a repeater and inside for each row has a child which is a datalist. The child datalist use control parameters as its datasource parameters, one of the parameters is a field value of parent rowitem. Inside the child datalist, there are multiple checkbox with text and the text is from child datalist rowitem field value. My problem is when I change the checkbox status, ie checked or unchecked, when the program enter into postback event like button click, the page automatically call the databind() of child datalist which causing the checkbox status lost(all checkbox become unchecked). But actually there is no databind() in code behind. Is anyone can tell me how i can disable the databind for child datalist during the postback?