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 } ] } });
Leave a comment: