Sets or retrieves the data in the grid row selector. Converted to the display text by the selector format object.
var value = obj.getSelectorData();
obj.setSelectorData(value);
obj.onSelectorDataChanging = function(value){...};
obj.onSelectorDataChanged = function(value){...};
obj.onSelectorDataError = function(value){...};
Encoding html control characters (<
, >
, "
, &
).
obj.setSelectorData("<selector text>");
obj.setSelectorFormat(new AW.Formats.String);
obj.setSelectorText(function(i){
var data = this.getSelectorData(i);
var format = this.getSelectorFormat(i);
return format ? format.dataToText(data) : data;
});
Applying number format
var number = new AW.Formats.Number;
number.setTextFormat("$ #,###.##");
obj.setSelectorData("1234567.890");
obj.setSelectorFormat(number);
obj.setSelectorText(function(i){
var data = this.getSelectorData(i);
var format = this.getSelectorFormat(i);
return format ? format.dataToText(data) : data;
});
Should always be used together with the selector format object and converter function in the selector text property (see the examples above).
Overview: using format converters
Grid templates: selector
Selector model: text, image, tooltip, link, value, format
Data properties: cell, header, footer, top, bottom