Announcement

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

    ListGrid hilites by expand row

    I have set hilites in the listgrid. If I expand a row then hilites are not applied to that row.
    Before expansion
    Click image for larger version  Name:	Screenshot 2024-10-17 143240.png Views:	7 Size:	8.7 KB ID:	273887

    After expansion.
    Click image for larger version  Name:	Screenshot 2024-10-17 143312.png Views:	7 Size:	22.4 KB ID:	273888
    Version SNAPSHOT_v13.1d_2024-08-14/Pro Deployment (2024-08-14)
    Last edited by Hirn; 17 Oct 2024, 16:46.

    #2
    Expansion components are separate components, not part of the ListGrid, and in this case, apparently significantly customized (you've added a ToolStrip and such).

    It seems like you're expecting some kind of magic and/or heuristics to happen, like maybe the ListGrid analyzes the expansion component, sees if there's another highlight-capable component somewhere in the component hierarchy, and then auto-applies highlights to that subcomponent?

    There is no such feature, and the heuristics & guessing required to build such a feature would be likely to backfire, so it's not a particularly compelling feature from our perspective.

    You of course have full control over the expansion components you create, and can apply highlights from the main grid when and where that makes sense for your particular application.

    Comment


      #3
      I don't expect hilites to be applied to expansion components. As you can see from the screenshot, hilites are not applied to the List Grid row, not to the expansion.

      Maybe you are irritated by the fact that there are lines with triangular icons? Then these are the icons for grouping the rows of the List Grid.
      And I made the icons for expanding ListGrid rows invisible. I corrected the first post and maybe it will be clearer.

      Without grouping, the result is the same. Hilites for List Grid rows are lost when those rows are expanded.

      Comment


        #4
        Wait, you're saying that declarative hilites (ListGrid.hilites) are turned off when you expand a component?

        Those are unrelated render systems, which is why it was very unexpected to have such a thing reported.

        Can you please show how this can be reproduced? Be sure to test with a base skin, as just about the only way we can think of for this to happen would be bad CSS, or perhaps an override of getCellCSSText() or getCellStyle() which does something wrong (no semicolon between CSS properties, for example).

        Comment


          #5
          I made changes in this example and this effect is also being monitored there
          https://smartclient.com/smartclient-...pansionDetails

          Code:
            isc.ListGrid.create({
              ID: "itemList",
              width:500, height:300,
              hilites: [
                {
                  fieldName: 'SKU',
                  cssText: 'color:#FF0000;',
                  criteria: {
                    fieldName: 'SKU',
                    operator: 'equals',
                    value: '45300'
                  }
                }
              ],
              expansionFieldImageShowSelected:true,
              dataSource: supplyItem,
              autoFetchData: true,
              fields: [
                { name: "itemName" },
                { name: "SKU" }
              ],
              canExpandRecords: true,
              expansionMode: "details",
              getExpansionComponent: function(record) {
                let details = window.itemList.Super("getExpansionComponent", record);
                details.hilites = [
                  {
                    fieldName: 'SKU',
                    cssText: 'color:#FF0000;',
                    criteria: {
                      fieldName: 'SKU',
                      operator: 'equals',
                      value: '45300'
                    }
                  }
                ];
                return details;
              }
          });

          Comment


            #6
            Unfortunately, this reply has confused things again.

            You are trying to set detailViewer.hilites, but that property doesn't exist - DetailViewer does not support hilites. So if you are not seeing hilites on your DetailViewer, that's why.

            If you still think there's something wrong with how the ListGrid implements highlights when there is an expansion component, we need a test case showing a problem.

            Comment


              #7
              Hi Isomorphic,

              there is also a hilites on the ListGrid in #5 which shows on sample start (SNAPSHOT_v14.0d_2024-10-17) and disappears on expansionComponent open.

              Best regards
              Blama (not OP)

              Comment


                #8
                Blama you actually reproduced that? Our own quick check (not with OP's sample code) did not. What skin were you using?

                Comment


                  #9
                  Hi Isomorphic,

                  yes, here in Shiva (SNAPSHOT_v14.0d_2024-10-17) with the code from #5.

                  Best regards
                  Blama

                  Click image for larger version

Name:	Hilite removed.gif
Views:	31
Size:	63.1 KB
ID:	273915

                  Comment


                    #10
                    the hilites work very well in DetailViewer. This can be seen if you make the SKU column in the List grid invisible and expand the first line of the Listgrid
                    Click image for larger version

Name:	Screenshot 2024-10-19 054402.png
Views:	22
Size:	37.3 KB
ID:	273918
                    But in the List grid itself, they stop working when expanding (if the SKU column is visible)
                    Before expand
                    Click image for larger version

Name:	Screenshot 2024-10-19 055422.png
Views:	19
Size:	58.1 KB
ID:	273919
                    after expand
                    Click image for larger version

Name:	Screenshot 2024-10-19 055555.png
Views:	19
Size:	43.7 KB
ID:	273920

                    Comment


                      #11
                      As we've just explained: hilites are not supported in DetailViewer - you can see this very clearly in the docs.

                      It looks like you've stumbled across some undocumented test code that appears to make one type of hilite work in limited circumstances. That test code might become part of a future feature, or might not - because it's not documented, you should not have any expectations.

                      If you'd like to have hilites supported on DetailViewer as a declarative feature, you can use the Feature Sponsorship program. Alternatively, if you need the feature in your app but don't want to help support it for others, just implement it in your app code (which is pretty easy).

                      In the meantime, if you rely on the undocumented functionality, please expect that it may break unexpectedly - as in on a minor patch, or with a seemingly unrelated setting change, or skin change, or whatever. It's not a feature, so no attempt is made to preserve it.

                      Separately, we do finally have an unambiguous report of ListGrid hilites (a supported feature) turning off in an expansion row. This is very unexpected, but we'll check it out.

                      Comment


                        #12
                        ... and this turned into a perfect example of why you don't try to use undocumented features. Your attempt to use hilites on the DetailViewer - where it is not supported - is the reason your ListGrid hiliting disappeared on expansion.

                        So no bugs here, just remove the attempt to use unsupported features and you're set.

                        Comment


                          #13
                          I wasn't looking for undocumented features. I just thought that Detailview is also a kind of table and just applied hilites to it. It turned out what happened.
                          Last edited by Hirn; 21 Oct 2024, 09:42.

                          Comment

                          Working...
                          X