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

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
LVL 1
shieldguyAsked:
Who is Participating?
 
prairiedogCommented:
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
 
shieldguyAuthor Commented:
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
 
prairiedogCommented:
Is it a GridView or DataGrid control? Do you have a Repeater in each row of the DataGrid/GridView?
0
 
shieldguyAuthor Commented:
its a datagrid and yes I have repeater in each row
0
 
prairiedogCommented:
Can you show me how you bind your repeater control?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.