jQWidgets Forums

jQuery UI Widgets Forums Grid Rebind data from server?

This topic contains 4 replies, has 1 voice, and was last updated by  realtek 11 years, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Rebind data from server? #29690

    realtek
    Participant

    Hi,

    I have a grid which has a variable in a dataAdapter which can be changed when a Tree Item is selected, I would like to rebind the datasource by sending the request back to server which returns the new results to the grid.

    What would be the best method to re-send the request to the server (like it did when the grid was loaded).

    I have tried ‘refreshdata’, ‘render’, ‘refresh’

    But nothing seems to send the origional request….

    Thanks

    Rebind data from server? #29691

    realtek
    Participant

    I have also tried:

    dataAdapter.dataBind();

    Rebind data from server? #29692

    realtek
    Participant

    hmm, dataAdapter.dataBind() is resending the new request which is good.

    But the data isn’t reflected in the Grid… could the refresh be happening to the grid before the data is returned from the server?

    Rebind data from server? #29706

    realtek
    Participant

    OK, sorted.

    I’m not sure if it is a bug or the way my code is but if the data that is provided when the grid is first loaded on the page is empty (i.e returns no rows), and you then reset the source it does NOT populate the grid.

    However, if the initial set of data returned does provide some rows and you then change the source, it works.

    So it sounds like its because no cells are actually created in the Grid if nothing is returned, therefore it cannot render it correctly.

    Is this a bug?

    Rebind data from server? #29708

    realtek
    Participant

    After adding some more data in my source, I can confirm you get the rows in the Grid each time you reset the source but it does not set the cells.

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

You must be logged in to reply to this topic.