Link to home
Start Free TrialLog in
Avatar of donaldcroswell
donaldcroswell

asked on

Remove HeaderTemplate from a Repeater when no results

Hello Experts,

I have a repeater that has a HeaderTemplate with the following code:
                        <HeaderTemplate>
                            <tr><td style="padding: 0 0 0 40px;">
                            <table class="AdminReport">
                                <tr>
                                <th>Amount Saved</th>
                                <th>Amount Earned</th>
                                <th>Not Meeting Goal</th>
                                <th>Future Payouts</th>
                                <th>Payouts Made</th>
                                </tr>
                        </HeaderTemplate>

I want to remove that header if there are no rows...

How can I achieve this?

Many thanks
Don

SOLUTION
Avatar of Rajul Patel
Rajul Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of donaldcroswell
donaldcroswell

ASKER

Thanks Guys,

I ended up using the second solution and skipped the bind if the datasouce count was 0.

Cheers
Don