jQuery UI Widgets › Forums › Grid › Issue with rendered status bar
This topic contains 2 replies, has 2 voices, and was last updated by Kiran 9 years, 4 months ago.
-
Author
-
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); ............... });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 StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Thanks for your reply.
I’ll modify / rearrange the code and try to initiate the grid once and repost.
Thanks,
Kiran -
AuthorPosts
You must be logged in to reply to this topic.