• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2768
  • Last Modified:

Display gridview without records

I need to display a Gridview which has no records.
I need to check if there is no data in it and display empty gridview.
It should display data if it exists.

Can someone help me with this
0
de1209
Asked:
de1209
  • 2
1 Solution
 
nehayaCommented:
In grid view, there is a template of no records
<EmptyDataTemplate>
<!-- Add here your 'No records found' message -->
</EmptyDataTemplate>
0
 
nehayaCommented:
To Explain:
You can chaged it by inserting this between your <asp:GridView> and </asp:GridView>
<EmptyDataTemplate>
<!-- Add here your 'No records found' message -->
</EmptyDataTemplate>
Or by clicking right clik on your gridview in your page-design -> Edit Templates -> EmptyDataTemplate
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now