Link to home
Start Free TrialLog in
Avatar of ASPDEV
ASPDEV

asked on

Column span all columns when Gridview Data is empty

Hello Experts,

I was trying to show gridview Headers , when there is no data, but I cannot column span all columns and remove the rowstyle and show the text "No Data Present".

Sample gridview:

ID         NAME
--        ------------

     NO DATA PRESENT


Something like above.
Avatar of guru_sami
guru_sami
Flag of United States of America image

With 4.0 you can set ShowHeaderWhenEmpty="True" and have EmptyDataTemplate to have your text.
Avatar of ASPDEV
ASPDEV

ASKER

Sorry, It was ASP.NET 3.5.
ASKER CERTIFIED SOLUTION
Avatar of guru_sami
guru_sami
Flag of United States of America 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
Avatar of ASPDEV

ASKER

Thanks.