Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Click event performed on ListGrid's group summary row

    I'm wondering how to add a click event handler on the group summary row of a ListGrid.

    addRecordClickHandler() does not seem to have effect on the group summary row.

    Thanks!

    #2
    Remember to always post your full version and browser at a minimum.

    recordClick should be firing normally on the group summary row, if you're not seeing this, try modifying a sample to demonstrate the problem.

    Comment


      #3
      I tried the following showcase example
      http://www.smartclient.com/smartgwt/showcase/#grid_summaries_featured_category

      Added the record click handler code below:

      listGrid.addRecordClickHandler(new RecordClickHandler() {

      @Override
      public void onRecordClick(RecordClickEvent event) {
      ListGridRecord record = event.getRecord();
      if (record.getIsGroupSummary()) {
      System.out.println("Received record click event on summary row.");
      } else {
      System.out.println("received record click on other rows.");
      }
      }

      });

      I don't see the click on summary row event being caught.

      I'm using smartgwtpower-4.1-02-19-2014 and FF 17.0.9.

      Comment


        #4
        Ah, we see the problem - the framework marks these rows as disabled to prevent them being selected edited, showing rollover, etc because by default they are completely non-interactive.

        If you wanted to provide interactivity, you could add a click handler to the ListGrid.body AutoChild, then use ListGrid.getEventRow() to determine the row that was clicked and detect that a summary row was hit.

        Comment

        Working...
        X