I see that there is a setting 'setUseCellRollOvers' to apply a RollOverCanvas to each cell. However what can be done do display it only on the cells from a certain column and not for the entire grid?
Announcement
Collapse
No announcement yet.
X
-
See setUseCellRollOvers(), which is mentioned in setShowRollOverCanvas().
Wr.t. to the showcase: I'd always use the SmartClient showcase (I'm using SmartGWT myself), as it is easier to test and change samples there. Everything possible in SmartClient is working in SmartGWT as well with slight name variations (e.g. properties instead of setters).
Best regards
Blama
Comment
-
I was looking at this sample
https://www.smartclient.com/smartcli...izeIncrease=10
and wondering if I could have those controls at cell level...thanks to this thread I realized that it's possible, and it's pretty cool, just modify the sample like this:
Code:isc.ListGrid.create({ ID: "countryList", width: 520, height: 224, data: countryData, selectionType: "single", fields: [ {name: "countryCode", title: "Flag", width: 50, type: "image", imageURLPrefix: "flags/16/", imageURLSuffix: ".png"}, {name: "countryName", title: "Country"}, {name: "capital", title: "Capital"}, {name: "continent", title: "Continent"} ], showRollOverCanvas: true, showRollUnderCanvas: false, // disable the rollUnderCanvas because we're not using it rollOverCanvasConstructor: isc.HLayout, useCellRollOvers: true, getRollOverCanvas: function (rowNum, colNum) { var fieldName = this.getFieldName(colNum); if (fieldName === 'countryCode') return null; // don't want controls for this field var canvas = this.Super("getRollOverCanvas", arguments); canvas.fieldName = fieldName; return canvas; }, rollOverCanvasProperties: { snapTo: "R", height: 20, width: 55, members: [ { _constructor: "Button", title: "+", click: function () { isc.say('you clicked plus, field "' + this.parentElement.fieldName + '".<br>Record is:' + this.echo(this.parentElement.record)); }, height: 20, width: 27 }, { _constructor: "Button", title: "-", click: function () { isc.say('you clicked minus, field "' + this.parentElement.fieldName + '.<br>Record is:' + this.echo(this.parentElement.record)); }, height: 20, width: 27 } ] } });
Comment
Comment