Display gridview without records

Posted on 2006-06-02
Last Modified: 2012-06-27
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
Question by:de1209
    LVL 6

    Expert Comment

    In grid view, there is a template of no records
    <!-- Add here your 'No records found' message -->
    LVL 6

    Accepted Solution

    To Explain:
    You can chaged it by inserting this between your <asp:GridView> and </asp:GridView>
    <!-- Add here your 'No records found' message -->
    Or by clicking right clik on your gridview in your page-design -> Edit Templates -> EmptyDataTemplate

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on could not pull conte…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now