Description:
When HeaderSpan is enabled together with various other settings, the header titles stay half-hidden (they do not drop on the correct position) as seen in picture 1 below.
- After about 30 seconds the headers drop from alone, no action is made, no JS code is running from my code, no SC functionality is triggered from my side.
- After reloading the grid (the fields are rebuild) the problem reoccurs
- If any column is resized, all the headers "fall" to their correct position
NOTE: This bug occurs only in SC10 and not in SC9 (various versions of SC9 have been tested)
Picture 1: How it is displayed
https://dl.dropboxusercontent.com/u/18846367/pic1.PNG
Picture 2: How it should be displayed (after about 30 seconds or after resizing it is shown like this)
https://dl.dropboxusercontent.com/u/18846367/pic2.PNG
1. SC versions where the problem exists: SC10 2015-01-04 / 2015-01-20 / 2015-02-05 all in LGPL version
2. IE 10-11 / FF 32-35
6. sample of code: I tried to reproduce the bug on "SC10 Feature Explorer" but I did not manage it as I can not simulate the actual code of mine due to the non existent serverside part and communication. A configuration similar with my production grid is shown below.
Additionally:
- The grid is initially defined only with one field (time, the first one) and the other fields are dynamically loaded from the server (there are two type of fields with width 30 or 80) and at the end a "spacer" field which takes the rest of the space to fill the parent layout.
- The problem is strongly connected with the use of !!"autoFitFieldWidths"!!
-setting it false the problem disappears
-it occurs ONLY with autoFitWidthApproach="title" or "both" (with "value" the problem disappears)
autoDraw and autoFetchData are false to my production code, as the data fetch is triggered separately together with the draw.
The code is based on the example --> http://www.smartclient.com/docs/release/a/system/reference/SmartClient_Explorer.html#headerSpans
My temporary performance expensive workaround (in the transformResponse section)
When HeaderSpan is enabled together with various other settings, the header titles stay half-hidden (they do not drop on the correct position) as seen in picture 1 below.
- After about 30 seconds the headers drop from alone, no action is made, no JS code is running from my code, no SC functionality is triggered from my side.
- After reloading the grid (the fields are rebuild) the problem reoccurs
- If any column is resized, all the headers "fall" to their correct position
NOTE: This bug occurs only in SC10 and not in SC9 (various versions of SC9 have been tested)
Picture 1: How it is displayed
https://dl.dropboxusercontent.com/u/18846367/pic1.PNG
Picture 2: How it should be displayed (after about 30 seconds or after resizing it is shown like this)
https://dl.dropboxusercontent.com/u/18846367/pic2.PNG
1. SC versions where the problem exists: SC10 2015-01-04 / 2015-01-20 / 2015-02-05 all in LGPL version
2. IE 10-11 / FF 32-35
6. sample of code: I tried to reproduce the bug on "SC10 Feature Explorer" but I did not manage it as I can not simulate the actual code of mine due to the non existent serverside part and communication. A configuration similar with my production grid is shown below.
Additionally:
- The grid is initially defined only with one field (time, the first one) and the other fields are dynamically loaded from the server (there are two type of fields with width 30 or 80) and at the end a "spacer" field which takes the rest of the space to fill the parent layout.
- The problem is strongly connected with the use of !!"autoFitFieldWidths"!!
-setting it false the problem disappears
-it occurs ONLY with autoFitWidthApproach="title" or "both" (with "value" the problem disappears)
autoDraw and autoFetchData are false to my production code, as the data fetch is triggered separately together with the draw.
The code is based on the example --> http://www.smartclient.com/docs/release/a/system/reference/SmartClient_Explorer.html#headerSpans
Code:
isc.ListGrid.create({
ID: "countryList",
width:750,
height:224,
minWidth:300,
membersMargin:0,
// autoDraw:false,
// autoFetchData:false,
alternateRecordStyles:true,
showAllRecords: false,
canGroupBy: false,
showHeaderContextMenu: false,
headerHeight:58,
headerSpanHeight:21,
headerHeight: 40,
canSort:true,
fixedRecordHeights:true,
leaveScrollbarGab: false,
autoFitMaxiWidth:"100%",
autoFitFieldWidths: true,
autoFitWidthApproach:"title",
printWrapCells: false,
printAutoFit: true,
cellEventForDrag: null,
canDragRecordsOut: true,
dragDataAction:"copy",
dragTrackerMode:"icon",
selectionType:"single",
dragAppearance:"tracker",
dataSource: countryDS,
autoFetchData: true,
fields:[
{name:"countryCode", title:"Flag", type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country"},
{name:"capital"},
{name:"government"},
{name:"independence", title:"Nationhood"},
{name:"population", title:"Population"},
{name:"area", title:"Area (km²)"},
{name:"gdp"}
],
headerSpans: [
{
fields: ["capital", "government", "independence","population", "area"],
title: "Government & Politics"
}
]
})
Code:
//a is the ListGrid object
a.setAutoFitWidthApproach('both');
a.setAutoFitFieldWidths(true);
a.autoFitFields();
a.setAutoFitFieldWidths(false);
Comment