Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

SmartClient v9.1_Pro - AutoFit / "both" issue

$
0
0
Hi,

We are facing an issue with the version v91p_2014-11-24_Pro (I upgraded to the last nightly build and the issue is still there) and autoFit.

We created a ListGrid with the foolowing params
Code:

autoFitFieldWidths : true
autoFitFieldsFillViewPort : false
autoFitWidthApproach : "both"
autoFetchData : false

The first time we display the list, columns are adjusted to fit titles size (which seems logic as we have no data in the list).

Then when I trigger the fetchData, I'm expecting that column widths are updated to fit "both" data and title size. But it's not.
If I trigger the fetch another time (so with data in the list), column widths are updated well.

With the version we used before this one (v91p_2014-07-23_Pro), we didn't face this issue. I have a look in the code, and it seems that the code has change in ListGrid.setData().

In v91p_2014-07-23_Pro the code was
Code:

    // if any fields are marked as autoFitWidth, recalculate their sizes

    this.updateFieldWidthsForAutoFitValue("setData called.");

and was replaced by the following code in v91p_2014-11-24_Pro
Code:

    // if any fields are marked as autoFitWidth, recalculate their sizes

    if (this.isEmpty() && ((isc.ResultSet && isc.isA.ResultSet(this.data)) ||
                    (isc.ResultTree && isc.isA.ResultTree(this.data))) )
    {
        this._updateFieldWidthsOnDataArrived = true;
    } else {
    this.updateFieldWidthsForAutoFitValue("setData called.");
    }

Do you have any suggestion/idea to have "autoFit / "both"" working at the first time we fetch data?

Thank you.

Viewing all articles
Browse latest Browse all 4756

Trending Articles