Announcement

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

    When to use treeGrid.getEditedRecord() vs tree.getData().getAllNodes()

    I am using SmartClient_v111p_2017-09-14_LGPL in IE11.

    The application may be displaying a large tree with some nodes open and some nodes closed. Most of the treeGrid is not visible. The user may change the state of a checkbox or click a button which changes the state of check boxes displayed and not displayed. Other items on the page are enabled/disabled base the state of all checkboxes. Is there a way to get the true state of all checkboxes? Is there a way to force the getEditedRecord() values into the getData().getAllNodes() values? Is there a way to identify is a record is actually displayed and switch between methods of getting the state based on it being displayed? Would refreshRow or redraw essentially merge the records so only the getAllNodes() need to be checked?

    #2
    There's way too little detail to make sense of your question..

    What are the checkboxes? The built-in selection checkboxes? Checkboxes from a boolean field? Something else?

    Are you making the checkboxes checked via editValues? If so, why did you do this? If checked state is stored as an editValue, saving the editValues would obviously move the state into the records... but again it's unclear how you chose this approach in the first place..

    Comment


      #3
      The checkboxes are of type Boolean and there can be multiples per record in a TreeGrid. I am programmatically setting the value by: record.field = true

      Comment


        #4
        If you are applying the change in that way, there is no involvement of editValues and getEditedRecord() will be the same data as the data returned by getAllNodes().

        You do need to use either refreshCell() or refreshRow() each time you make a direct change to record data in this way.

        Comment

        Working...
        X