jQWidgets Forums

jQuery UI Widgets Forums Grid How to replace the whole grid with another grid

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • zandro
    Participant

    Hi Guys,Im not sure if this is the right topic where to post this question. I have an grid that resides inside an splitter but what I want to happen is that if I press a certain button the whole grid on that part of splitter will be replaced/removed. Is it possible like for example on the part of splitter i have a initial grid then when I clicked a certain button that grid will be removed and replaced by a whole new grid like different source,columns and data’s as in changed overall.

    Thanks in advance

    zandro


    Peter Stoev
    Keymaster

    Hi zandro,

    The Grid’s “destroy” method removes a Grid from the DOM. Then you can add new DIV tag using jQuery’s append or prepend methods and create a new Grid from it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    zandro
    Participant

    Hi Peter,

    Thanks for the response. I just have a follow up question. I think I already tried the destroy function but I guess it was on other element (jqxwindow i guess) but the problem is after the destroy method that I did I wasn’t able to call/open the window again. So my question is If I destroy the grid would I be able to return it? Like for example I did destroy the grid on the splitter and replaced by other elements, can i still return it again if I pressed another button or lets say a navigation button?

    Another question, How can I create another elements lets say a grid and add it on the prepend function? Do i need to initialize it first just like the normal way? Declare the source,adapter then on he prepend function there is where I would put the div tag for the new gird?

    Thanks in advance.

    Zandro


    Peter Stoev
    Keymaster

    Hi Zandro,

    If you destroyed the window, you will not be able to open it again because it is destroyed. The process of creating a Grid is – having a DIV tag( does not matter whether you add it dynamically with append/prepend or it’s already defined) and initializing the Grid in the way shown in the samples.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.