Solved

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

Posted on 2008-06-18
5
1,531 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
  • 3
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
prairiedog earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
its a datagrid and yes I have repeater in each row
0
 
LVL 22

Expert Comment

by:prairiedog
Comment Utility
Can you show me how you bind your repeater control?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now