.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to implement using Repeater Control

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :ASP.Net


|_|  RootMenu


SubRootMenu     |_| Permission1   |_| Permission2  |_| Permission3


|_|  RootMenu2


SubRootMenu2     |_| Permission1   |_| Permission2  |_| Permission3


|_| is a CheckBox in the above scenario.

In the above diagram i need to implement using repeater control and Checkboxesby dynamically according to DataBase Values.

If i select  RootMenu2  it has to select all SubRootMenu2 options has to be selected.

How to implement the above scenario. Please suggest a article or with Example. Its Urgent for me

View Complete Post

More Related Resource Links

ASP.NET repeater control - databind with style

even used the inline editing features, which I at the time thought was the coolest way possible to write ASP.NET code ( I managed to write code to hide all other rows and only show the current one - the row being edited). With a nice looking EditTemplate it looked indeed very slick but it really turned into giant and hard to manage code behind files.

Creating Paging for a Repeater Control

A common question is "How do I implement paging within a Repeater?" Although the beauty of the Repeater control is its flexibility, you're on your own for building most functions. ASP.NET 2.0 has included some new controls that provide paging, as does the DataGrid in ASP.NET 1.1. However, this tip shows you how to roll your own paging for a simple data viewer.

Adding new items to a Repeater control with transitions?



I am currently in the process of writing a facebook type 'activity feed' for a site. Currently I am binding the last 10 items to a repeater control, which contains a usercontrol representing each item. This works fine but there are a couple of requiremnts that are giving me problems and wondered if the the good people of the forum could make some suggestions.

The requirement is that when a user clicks a refresh button any new events are added to the top of the list, the previous items drop down and the equivalent number of old items drop off the bottom, all with nice slider transitions.

I have put the repeater inside of an update control and are able to handle the transitions by using RegisterStartup script to drop jquery calls onto the page for the slider. However I cannot find a way to dynamically add or remove new datarows to the repeater. I need the old items to stay in the repeater and be pushed down by the new items, so completely refreshing the datasource seems like a bad idea.

I was thinking about maybe storing the datasource in the viewstate and adding rows to that, maybe with an extra column on the end which stores what transition is needed on the databind for my jquery, but there will be a 'View more items' link at the bottom of the page, so I am worried that the list could get pretty large and there

Child control in Repeater



     I am trying to find a child control from a repeater control's child control. I have the following structure like a top control is a repeater, below which is a Panel and below this is a DateControl(custom control).

I want to find the DateControl.

<asp:Repeater runat="server"
                       <asp:Panel ID="pnlAddDependent"

                                  <xyz:DateControl runat="server" ID="dfDepBirthDate"


When iam trying like this, i am getting the "Object Reference not set error". Please help, it is urgent.

if (this.rptMembers.FindControl("pnlAddDependent").FindContro

Help with updating database with values from Repeater control using c#


Hello, I'm new to ASP.NET 3.5 with C#. I really need some help.

I used a Repeater control to create a simple (editable) list where, when a user logs in, they can edit their list of expenses.  The ASP page works fine.

 My issue is with the code-behind.  I am really confused with how to extract the values from the repeater control. The FindControl method does not seem to be working.  Also, the code I am using resets my 'Amount' values back to 0.00. (0.00 is the amount the user sees when they first encounter the page).

 Here's a portion of the code on the ASP page:

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"





<td><asp:Label ID="lblExpId" runat="server"  Text='<%# Bind("ExpId") %>'></asp:Label> </td>

 <td><asp:Textbox ID="lblExpense" runat="server" Width= "190px" Text='<%# Bind("ExpenseName") %>'></asp:Textbox> </td>

 <td><asp:Textbox ID="txtAmount" runat="server" Width= "100px"

jQuery Rating Control in Repeater - Not Duplicating per Record

Hi Everyone,There is a similar instance of this @ http://forums.asp.net/p/1380776/2919093.aspx#2919093 However I haven't had a response, maybe due to the age of the topic, but the problem is different in the sense I am not using AJAX Rating Control, I am using radio buttons contained in a Div named Ratings, which is picked up by jQuery to style to radio buttons accordingly. The output is that it will put the stars on the first record but anything after just shows origional unstyled radio buttons. Just thinking off the top of my head, but does anything need to be put in the ItemDataBound event? The jQuery for the stars etc were attained from the link below:http://orkans-tmp.22web.net/star_rating/index.html#demos=&main-menu=0&demo-tabs=3 Here is my code:.ASPX:<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Admin_Test" Title="Untitled Page" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="CPCHeader" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="AdminCPC" Runat="Server"> <asp:R

Issue with Repeater control.

Hello. I have a Repeater control which contains asp:Button control in ItemTemplate. I want to handle Button's Click event, but when I'm clicking that Button the error is thrown: 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.But on other computer that piece of code is working.I set EnableEventValidation to false, but it's still not working. Please help me out. 

how to implement user rating using ajax rating control from database?

Hi,I'm beginner to ajax. I've a database table having fields rating and item id.I've to display star rating using  ajax rating control for the corresponding item id.How can i do this?  

Dynamically (on client side) populating data control (repeater) when dropdown item is selected

Hello!I'm currently working on a project and I want to make as much things as possible performing on client side - with as little loading as possible.The project consist of three "main" pages. On one page I use jQuery DataTable plugin which is working great. One page has tabs (using jQuery). I want to put datacontrol (repeater) on this site and when  user selects one item in dropdown, data in repeater loads on client side, without performing the action on server.I wonder if this is possible and if somebody can give me some case to help with?Thanks!I hope I was clear enough. all the best

I need to be able to disable a button inside a repeater control when an item in the data is <1

For example, I have an inventory table. If any one of the items is less then one, I need to disable the button. <asp:Repeater id="repeater1" <ItemTemplate> <asp:Button id=btnSize /> </ItemTemplate> </asp:Repeater>  

Dynamically Binding Header of Repeater Control

Hi , I am stuck up into following Issue while binding Repeater control dynamically from database I have repeater control which I want to populate from database.. asp:Repeater id="Repeater1" runat="server">   <HeaderTemplate>      <table border="1">         <tr bgcolor="#ffcc99">            <th><asp:label id="Lname" runat ="server" text = "???"  ></asp:label></th> <th><asp:label id="Fname" runat ="server" text = "???"  ></asp:label></th>         </tr>   </HeaderTemplate>   <ItemTemplate>      <tr bgcolor="#ffcccc">        <td><%# DataBinder.Eval(Container.DataItem, "Col1") %></td>        <td><%# DataBinder.Eval(Container.DataItem, "Col2") %></td>      </tr>   </ItemTemplate>   <FooterTemplate>   </table>   </FooterTemplate></asp:Repeater&g

refreshing repeater control in asp.net

Hello all,i have been struggling a lot with repeater control refresh !! i displayed data using sql database and added 2 buttons "DEL" "ADD"these two functions are working effecinetly but my plm is am unable to rfresh the page as soon as i click the buttons am manually refreshing the data to exhibit the results please help me!!thankssujji

Background image in Repeater control

Hi, I have a repeater control:<asp:Repeater ID="Repeater3" runat="server" DataSourceID="SqlDataSource4">                <HeaderTemplate>                </HeaderTemplate>                <ItemTemplate>                    <div >                        <div style="background:url('<%# Eval("HomeSlideBgImage")%>') no-repeat top center" >                        <%# Eval("HomeSlideBgImage")%>                            <h2 id="welcome-heading">                        

Building webpart using repeater control

Hello all, am new to develop custom webparts ,right nw am using vs2008 to build a customwebpart for sharepoint 2007 am writing code in class library please let me know how can we  declare itemtemplate for repeater control and how  can we bind data for it   Thanks!

Server Control - Implement Postback


Hi all,

I am writing a server control and need to implement postback. It is a simple calendar control - it renders a textbox and a button using the override of RenderContents which pops up a asp:Calendar control in a new window (written separately to the control) which sets the value of the textbox with javascript.

I just want the TextBox to keep it's value on postback. I inherit from WebControl rather than from TextBox as I thought it would be nice to have a greater level of control but if inheriting from TextBox is better practice I'd be interested instead for guidance on how to add to the render rather than overwrite it altogether (to add a button).

I'm not in the habit of writing such general questions but what I haven't been able to find is some decent resources to put me on the right path.

I've been looking at http://msdn.microsoft.com/en-us/library/aa720415(v=VS.71).aspx but can't get it working (I think I've implemented everything they say in the article, other than that I am using a different render method, but it doesn't change anything).

Does anyone have any simple examples or resources they could point me at to help?

Thanks in advance,


HovermenuExtender with the Repeater control HeaderTemplate


Hi experts,


I am using HovermenuExtender with the  Repeater control.


All is working fine with 


but my problem is that i want to show 


, how can i do this ??? is this possible.


Here is my code :



Thanks in Advance


Object reference not set to an instance of an object in Nested Repeater Control of CheckBox List con

 if ((item.ItemType == ListItemType.Item) || (item.ItemType == ListItemType.AlternatingItem))
                Repeater rptsub = (Repeater)item.FindControl("rptsub");
                CheckBoxList Chksub = (CheckBoxList)rptsub.FindControl("Chksub");
                Label lblsubroot = (Label)rptsub.FindControl("lblsubroot");
                DataRowView row = (DataRowView)e.Item.DataItem;
                RootId = Convert.ToInt32(row["IdApplication"].ToString());
                MetadataPermissions metadataPermissions = new MetadataPermissions(); ;
                DataSet rptRootValues = new DataSet();
                rptRootValues = metadataPermissions.GetrptSubMenus(RootId);
                DataRow[] drows = rptRootValues.Tables[0].Select("IdApplicationroot = " + row["IdApplication"].ToString());
                foreach (DataRow chkpermsns in drows)
                   ListItem li = new ListItem(chkpermsns["PermissionName"].ToString());


<asp:Repeater ID="rptroot" runat="server" OnItemDataBound="rptroot_ItemDataBound">
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend