Announcement

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

    No groupingModes detected when setting getGroupValue on ListGridField

    Hi,
    When I set groupingmodes/methods on ListGridField level the groupingmodes are not detected. I think this is caused by this line of code in the ListGrid.js:
    var groupingModes = ( !field.getGroupValue ?
    field.groupingModes ?
    field.groupingModes :
    ( field._simpleType ?
    (field._simpleType.getGroupingModes) ?
    field._simpleType.getGroupingModes() :
    field._simpleType.groupingModes
    : false )
    : false );

    if getGroupValue is defined on field level (which is allowed according to the docs) then no groupingmodes are detected.

    I think this issue exists in the most recent 8.3 build of Smartclient also (looking at the source code), but I tested with a version of a few months back.

    gr. Martin
    Last edited by martintaal; 3 Sep 2012, 21:09.

    #2
    Although it might make sense as an enhancement, there don't seem to be docs suggesting that you can implement ListGridField.getGroupingModes().

    Comment


      #3
      Hi,
      In the version I have the documentation discusses groupingmodes on ListGridField. See the attached screenshot.

      gr. Martin
      Attached Files

      Comment


        #4
        Right, groupingModes, not getGroupingModes. And in the code snippet above, you can see that listGridField.groupingModes is indeed checked.

        Comment


          #5
          Maybe I read it wrong but if I check this code snippet then when a field has a getGroupValue then the groupingmodes property is not checked. This is also what my debugging showed to me.

          Btw, I did not mention getGroupingModes in my post(s) I only talked about groupingModes, so not sure what initiated your initial remark about getGroupingModes. Let me know if I missed something.

          gr. Martin

          Comment


            #6
            Ah, we did misread you initially, we read getGroupValue() as getGroupingModes().

            Yes, it seems like getGroupValue() would *have* to be implemented if you wanted to use listGridField.groupingModes to declare multiple custom grouping modes (rather than just hide certain built-in modes), so getGroupValue() being present should not cause listGridField.groupingModes to be ignored.

            We'll create a sample of doing this and, in the process, fix this or other bugs as needed.

            Comment


              #7
              This should be fixed for tomorrow's nightly, and there's also a new sample under Grids -> Grouping and Summaries showing usage.

              Comment

              Working...
              X