Announcement

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

    Orderlines of Orders paired ListGrids...

    SmartClient v12.0p_2019-06-20/Pro Deployment 2019-06-20
    FireFox

    Can someone point me to an example of an Orderlines of Orders?

    Something as simple as two ListGrids, one for Orders and one for OrderLines, such that when an Order is selected the OrderLines are fetched.

    Does a basic Orderlines of Order screen require something better than the Pro Edition?

    Thanks in advance.

    #2
    This is literally a one-liner so there is no sample for it: implement recordClick() so it calls fetchRelatedData() on your OrderLines grid. It only requires Pro.

    If you'd like to understand the mechanics of this, take a look at the docs for fetchRelatedData(), and take a look at the (multiple) Dependent Selects example, in which relations are navigated in the context of paired SelectItems or ComboBoxes.

    Comment


      #3
      Building on our questions about order lines of orders, we are trying to invoke fetchRelatedData() on the expandSection() of a SectionStack. We have a ListGrid for billing statements (i.e. the orders). We also have a section stack that defaults to collapsed. One of the sections contains another ListGrid showing the bill's history of the bill selected in the main ListGrid (i.e. the order lines).

      Right now, we are calling fetchRelatedData() on a row-click in the main bill ListGrid. The issue that we are having is that fetchRelatedData() isn't firing while the section for the bill history is collapsed -- I'm assuming because it hasn't been drawn yet. In order to populate the bill history ListGrid, the user will need to expand the section AND THEN click a row in the bill ListGrid. How can we override the expandSection() functionality so that it will invoke fetchRelatedData() while still expanding the section the user selected? Is there a better way to handle this?

      I have attached a few screen shots that should help present the issue.

      Thanks,
      Attached Files

      Comment


        #4
        You can override expandSection() and just call Super() to preserve existing functionality. Another approach would be to use the visibilityChanged() handler or drawn() handler on the ListGrid.

        Comment

        Working...
        X