Forms Data Controls :: Create New Textbox In Nested Repeater Footertemplate?
Jan 15, 2010
I have a nested repeater which displays a food menu - e.g.
- Food 1
- Food 2
- Button 1
- Food 1
- Food 2
- Button 2
What I have is a series of buttons inside the itemtemplate of the parent repeater (button 1 and button 2) which, when clicked, i need to somehow add a new blank textbox to below food 2 in whichever section it is clicked
I am having trouble doing this. See my code snippet below:
When I run this though, I receive an error of "object reference not set to an instance of object..."
Do I need to actually find a control within the footertemplate itself?
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.
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
So as the footer is writing programmatically, I would like to hide the FooterTemplate for somebody who use the custom repeater.. I was thinking [PersistenceMode(PersistenceMode.InnerDefaultProperty)] will do that but apparently not..
I'm trying to create a nested gridview, but I'm stuck at the editing/deleting part of the nested gridview. (Below is my code).The nested gridviews are filling out nice, I've set the DeleteParameter in the SQLDataSource, but I'm still getting this error when trying to delete a criteria: 'The Gridview 'gvCriteria' fired event RowDeleting which wasn't handled.'I've tried to create a method 'gvCriteria_RowDeleting', but that didn't seem to work out.Someone who can give me a piece of advice? Would it be possible to fill the gridview without using gvDomain_rowDataBound? Dries
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.
It seems my Eval(Container.DataItem, "JobNID") is not working and I assume this is because the datasource of the outer (parent) repeater is an anonymous type. So how am I supposed to access a particular field of my anonymous type?
am using C# .net.. in my page am having nested repeater control.. in child repeater there is check box and a hidden ID. i want to store(here am get strucked) the ID of checked box in to my data base.. look at the below code..
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 am trying to find a way in whihc I CAN Move the columns of nested repeaters from one to another. Like I have three caegories of products say A,B,C and I will have X,Y,Z products within each categories and I am trying to find a way of I can find a way that on client side the user can drag items from one category to another like the drag functionality of Ajax control kit ReOrder List.
IdApplication ApplicationDesc Permissions 1 User Add 1 User Delete 1 User Update 2 Role Add 2 Role Delete 3 User2 Modify 3 User2 Change
How can i Bind like in nested repeater control
In my Nested repeater control bound i need to Bind the Values like this Formate According Groupwise
User Add Update Role Add Delete User2 Modify Change
In the nested repeater control i taken a label in Header Template i need to bind 3 different values Application Desc once User, Role, User2 and in Item Template i had binded the <%# Eval("Application Desc")%> but i am getting like this all permissions in 1 line
Nested Repeater Issue: Each category list gets populated with the same set of date values rather then being populated with the data associated with that category. Trying to Do: Trying to group FAQ's by category and then list them using the repeaters.
The data is queryed though a business logic layer object that makes a call to the data access layer object. The data access layer object uses linq to sql to return data. There are 3 parameters that are passed into the innerDataSource's ObjectDataSource control to populate the nested repeater control (propID, CatID, isVisible).
With the debugger, the correct data is being returned and written to the nested repeater firing from the nested repeater's ItemDataBound event. Once this event is finished, another event fires and runs the FAQRule object again on the business logic layer which re-populates the nested repeater with the same data for each category. I have 2 repeaters, outerRepater (parent) and innerRepeater(child) with 2 ObjectDataSource controls innerDataSource and outerDataSource. See code below : ASP Page:
I am using a repeater control and i want to use one more repeater control inside the existing repeater control .
<asp:Repeater ID="Repeater1" runat="server"> <HeaderTemplate> </HeaderTemplate> <ItemTemplate> <!-- start child repeater --> Here I want to use one repater control <!-- end child repeater --> </ItemTemplate> </asp:Repeater>
I am having my first go at a nested gridview within a gridview. I have successfully loaded the data and it displays fine. Within the child gridview I have two textboxes that the customer can change. I also have an Save button. When the customer selects the save button the RowCommand for the child grid executes as it should. However I am unable to figure out how to access the two textboxes.
In the past I have got the row index from e.CommandArgument, established the correct GridViewRow using the gridview ID and the row index, and then used findcontrol to get the textbox
int index = Convert.ToInt32(e.CommandArgument); GridViewRow row = gvGridView.Rows[index]; TextBox txtName = row.FindControl("txtName") as TextBox;
But when working within the Child GridView RowCommand event I am unable to figure out how to gain access to the textbox. The child gridview is not recognized.