Hi,
If you create field with name "length", then it is not possible to show/hide such a column in ListGrid using editFields() field picker. It is perfectly possible to show/hide such a column using grid's context menu at the same time.
To reproduce you may use showcase https://www.smartclient.com/smartcli...id=columnOrder and change example to:
and try to hide "Length" column using "Fields Picker" - nothing happens and the following error shows dev console:
Thanks,
MichalG
If you create field with name "length", then it is not possible to show/hide such a column in ListGrid using editFields() field picker. It is perfectly possible to show/hide such a column using grid's context menu at the same time.
To reproduce you may use showcase https://www.smartclient.com/smartcli...id=columnOrder and change example to:
Code:
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true,
data: countryData,
fields:[
{name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital", showIf:"false"},
{name:"continent", title:"Continent"},
{name:"length", title:"Length"}
],
canReorderFields: true
})
isc.IButton.create({
left:0, top:240,
title:"Show Capitals",
click:"countryList.showField('capital')"
})
isc.IButton.create({
left:130, top:240,
title:"Hide Capitals",
click:"countryList.hideField('capital')"
})
countryList.delayCall("editFields");
Code:
13:35:03.486:MUP4:WARN:Log:RangeError: invalid array length
Stack from error.stack:
DataSource._trackClientOnlyChanges()
DataSource.getClientOnlyResponse()
transformRequest()
DataSource.sendDSRequest()
DataSource.performDSOperation()
Canvas._performDSOperation()
Canvas.addData()
Canvas._addIfNotDuplicate()
Canvas.transferRecords()
Class.invokeSuper()
Class.Super()
FieldPickerListGrid.transferRecords()
Canvas.transferSelectedData()
click()
StatefulCanvas.handleActivate()
StatefulCanvas.handleClick()
[c]EventHandler.bubbleEvent()
[c]EventHandler.handleClick()
EventHandler._handleMouseUp()
[c]EventHandler.handleMouseUp()
[c]EventHandler.dispatch()
anonymous()
MichalG
Comment