[CLOSED] How to present the "No data to display" message with GridPanel?

  1. #1

    [CLOSED] How to present the "No data to display" message with GridPanel?

    Hi,

    Please suggest the right approach to present the "No data to display" message if the grid store is empty. I've tried the following:
                        this.GridPanel1.HideHeaders = true;
                        this.PagingToolbar1.Hide();
    While this is working to some degree, I'm not sure how to present the custom message in place of the grid. The GridPanel objects doesn't allow the use of Content container. I've tried to hide the grid altogether and display a message panel in its stead, but that approach appears even messier because of sudden layout issues.
    Last edited by geoffrey.mcgill; Feb 25, 2013 at 5:24 PM. Reason: [CLOSED]
  2. #2
  3. #3
    Quote Originally Posted by Vladimir View Post
    Thanks for the suggestion Vladimir! The following server code works:

    this.GridPanel1.GetView().EmptyText = "<div style='text-align:center;'>No data to display!</div>";
    Is there any way to define the EmptyText property in the GridView markup, maybe CustomConfig?
  4. #4
    You can set the .EmptyText property of the <ext:GridView> config.

    Example

    <View>
        <ext:GridView runat="server" EmptyText="No results..." />
    </View>
    Geoffrey McGill
    Founder
  5. #5
    Great, thanks for the help guys! Please mark this thread as closed.

Similar Threads

  1. Replies: 4
    Last Post: May 22, 2012, 10:40 AM
  2. Replies: 2
    Last Post: Apr 05, 2012, 4:55 AM
  3. Replies: 6
    Last Post: Nov 15, 2011, 2:02 AM
  4. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM
  5. Replies: 3
    Last Post: Sep 22, 2010, 10:30 AM

Posting Permissions