Solved

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

Posted on 2008-06-18
5
1,553 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

Turn Insights Into Action

You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.

With xMatters, you'll never miss a beat.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 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