jQuery UI Widgets Forums Grid Issue with rendered status bar

Tagged: , ,

This topic contains 2 replies, has 2 voices, and was last updated by  Kiran 7 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Issue with rendered status bar #90310

    Kiran
    Participant

    Hello,

    I’m using a popup window with contains a grid. The grid in popup window been rendered with statusbar containing two buttons. When ever I re-open the popup window, these two buttons are appended with the old buttons. How can I avoid this re-rendering the buttons again and again on status bar.

    $("#table").jqxGrid(
                        {
                            height: '150px',
                            width: '300px',
                            showstatusbar: true,
                            editable: true,
                            selectionmode: 'singlerow',
                            source: subgridSource,
                            renderstatusbar: function (toolbar) {
                                   var container = $("<div style='margin: 5px;'></div>");
                                   toolbar.append(container);
                                   var addButton = $("<div style='float: left; margin-left: 5px;'><img style='position: relative; margin-top: 2px;height:17px' src='css/images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'></span></div>");
                                 var deleteButton = $("<div style='float: left; margin-left: 5px;'><img style='position: relative; margin-top: 2px;height:17px' src='css/images/icon-delete.png'/><span style='margin-left: 4px; position: relative; top: -3px;'></span></div>");
                                container.append(addButton);
                               container.append(deleteButton);
    ...............
    });
    Issue with rendered status bar #90319

    Peter Stoev
    Keymaster

    Hi Kiran,

    I guess that you set all there properties again and again so not only the status bar’s rendering function is called again, but also all the other properties. My suggestion is to ensure that your Grid is created just once.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Issue with rendered status bar #90321

    Kiran
    Participant

    Hi Peter,

    Thanks for your reply.

    I’ll modify / rearrange the code and try to initiate the grid once and repost.

    Thanks,
    Kiran

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

You must be logged in to reply to this topic.