Author Topic: Cols with buttons for data loose icons and binding on horizontal scroll  (Read 3089 times)

karyn.ulriksen

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 8
    • View Profile
I have one column that contains one or more jquery-ui buttons.  This works great until the horizontal scroll bar is activated and that particular column is scrolled off and out of view.  Once the column scrolls out of view, the buttons loose their jquery-ui icons and their event bindings.  All other data is not impacted.





paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Cols with buttons for data loose icons and binding on horizontal scroll
« Reply #1 on: January 18, 2014, 08:05:50 am »
You would loose the bindings when you scroll the view, resize the columns, sort the columns, etc. The reason is any of these actions cause the grid to re-render and refresh itself.

Whenever the grid re-renders itself, there is a refresh event. So the solution is to utilize this refresh event to render jQueryUI buttons and do their event bindings.

Please see the refresh event of this demo as an example:

http://paramquery.com/pro/demos/editing
« Last Edit: January 18, 2014, 08:10:40 am by paramquery »