jQWidgets Forums

jQuery UI Widgets Forums Grid Supress the grid when no data found

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 13 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Supress the grid when no data found #5844

    campos
    Member

    Hi there, (first, sorry about my english)

    I would like to suppress the grid when no data is found through the dataAdapter. How can I do this? Because when I call the method that call my controller to get me the json result and it is empty they show me a empty grid, I would like to show to the user a message like “No data found to the search” or something like this.

    In the examples there are nothing saying about this nor the API of the jqxGrid component.

    Thank you

     

    Supress the grid when no data found #5855

    Peter Stoev
    Keymaster

    Hi campos,

    jqxGrid does not support the so called “empty prompt text”. As a possible solution, I suggest you to dynamically create an absolutely positioned DIV tag with high z-index with prompt text and position it over the Grid’s element when there’s no data. When the Grid’s ‘ready’ callback function is called, you can call the Grid’s ‘getdatainformation’ method. That method returns an object with field called ‘rowscount’. If ‘rowscount is equal to 0’, then display your prompt message and position it over the Grid.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.