?
Solved

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

Posted on 2008-06-18
5
Medium Priority
?
1,558 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 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

741 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