Announcement

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

    TreeGrid expandRecords question

    if I call expandRecords in the TreeGrid, even those nodes with the canExpand=false attribute are expanded. Is this how it should be?

    #2
    Yes - canExpand controls whether the end user can do expansions. You as the developer can still expand whatever records you want.

    Comment


      #3
      in SmartGWT, I have an event handler
      Code:
      listGrid.addRecordExpandHandler(new RecordExpandHandler() {
                  public void onRecordExpand(RecordExpandEvent event) {
                      ListGridRecord record = event.getRecord();
                      if(!condition) {
                          event.cancel();
                      }
                  }
              });
      will such a definition be an analogue of this event handler in SmartClient?
      Code:
          listGrid.expandRecord = function(record) {
              if(condition) {
                  this.Super("expandRecord", record);
              }
          }

      Comment


        #4
        Yes, except that in SmartClient, you would not actually add the handler that way, but rather in an isc.ClassName.create({ ... }) block. It would be invalid to assign directly like that.

        Why do you ask, troubleshooting something?

        Comment


          #5
          I have 20 applications on SmartGWT that I am rewriting on REACT. And in order not to completely rewrite the logic of applications, I try to borrow a lot from SmartGWT.

          Comment

          Working...
          X