Announcement

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

    autoFitData in expansionRelatedProperties is ignored

    SmartClient Version: v12.1p_2020-10-14/AllModules Development Only (built 2020-10-14)
    Chrome on OSX

    Hello, please modify the #expansionRelatedRecords sample like this:

    Code:
    isc.ListGrid.create({
        ID: "categoryList",
        width:850, height:300,
        alternateRecordStyles:true,
        dataSource: supplyCategory,
        expansionFieldImageShowSelected:true,
        autoFetchData: true,
        canExpandRecords: true,
        expansionMode: "related",
        detailDS:"supplyItem",
        expansionRelatedProperties: {
            border: "1px solid inherit",
            margin:5,
            autoFitData:"vertical"
        }
    });
    I've added the autoFitData:"vertical" setting to expansionRelatedProperties, but it is ignored:

    Click image for larger version

Name:	2020-10-15 14.23.23.jpg
Views:	13
Size:	60.7 KB
ID:	263836

    Is it expected?
    Last edited by claudiobosticco; 15th Oct 2020, 04:24.

    #2
    The code for creating the default expansionRelated screen calls sizing APIs in a way that turns off auto fit. You can easily replicate the default screen, or just turn on autoFit after the screen is created.

    Comment


      #3
      Thanks for the explanation. Yes, I've already replicated the default screen using getExpansionComponent.

      Comment


        #4
        Sorry, but after some more testing it seems that it's already autoFitData:"vertical", only autoFitMaxRecords is 4, so this sample:
        Code:
        isc.ListGrid.create({
            ID: "categoryList",
            width:850, height:300, 
            alternateRecordStyles:true,
            dataSource: supplyCategory,
            expansionFieldImageShowSelected:true,
            autoFetchData: true,
            canExpandRecords: true,
            expansionMode: "related",
            detailDS:"supplyItem",
            expansionRelatedProperties: {
                autoFitMaxRecords:50,
                border: "1px solid inherit",
                margin:5
            }
        });
        seems to work

        Comment

        Working...
        X