0

Is there an event that is fired from jqGrid to notify that a certain group is expanded or collapsed? I have searched in the internet and I found there is an event for treeGrid but not sure about jqGrid. I wonder if jqGrid has one so we can know if user is expanding / collapsing certain group by listening to that event.

Thanks!

blenzcoffee
  • 851
  • 1
  • 11
  • 35

1 Answers1

1

There are exist callback onClickGroup starting with jqGrid 4.0.0 (see here) and jQuery Event jqGridGroupingClickGroup starting with 4.3.2. The parameters are hid, collapsed. See the answer and this one for the corresponding code examples.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Is an event handler triggered when a group header row is clicked? – Suhail Gupta Oct 29 '15 at 11:14
  • 1
    @SuhailGupta: Not exactly. It will be called at the end of `groupingToggle` method. The method can be called by API or on click on the "+"/"-" expand/collapse button in the grouping header. There are currently no callback which will be called on click on the other part of group header row or group summary row. You can just define `click` handler on the whole `` (grid) and analyse `$(e.target).closest("tr.jqgroup")`. It it's empty then one clicked not on the grouping header row. You can ask separate question if you would have implementation problems.
    – Oleg Oct 29 '15 at 12:03