Solved

In Repeater control how to hide the footer when its item count is 0

Posted on 2008-06-18
5
1,546 Views
Last Modified: 2013-11-07
In Repeater control how to hide the footer when its item count is 0

I mean when the no of items in the item templaate of repeater control is zero then how can I hide what ever i put in the footer

Thanks
0
Comment
Question by:shieldguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
prairiedog earned 500 total points
ID: 21815382
In your Repeater control's ItemDataBound event handler, you can do something like this:

If (e.Item.ItemType = ListItemType.Footer) Then
            If Me.Repeater1.Items.Count = 0 Then
                e.Item.Visible = False
            End If
  End If
0
 
LVL 1

Author Comment

by:shieldguy
ID: 21820172
yes this logic is good but now the problem is that the repeater which i need to call is embeded as a item with in the another datagrid control so i cant call the repeater by its name

any suggestions?
0
 
LVL 22

Expert Comment

by:prairiedog
ID: 21821221
Is it a GridView or DataGrid control? Do you have a Repeater in each row of the DataGrid/GridView?
0
 
LVL 1

Author Comment

by:shieldguy
ID: 21821265
its a datagrid and yes I have repeater in each row
0
 
LVL 22

Expert Comment

by:prairiedog
ID: 21821849
Can you show me how you bind your repeater control?
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question