3.0 beta 2

String cell formatting in a grid

When the data format in a grid cell is string, what are the formatting options? Example

webReqGrid = new AW.UI.Grid;
var textFormat = new AW.Formats.String;
webReqGrid.setCellFormat([textFormat, ...]);

In this specific case, the cell contains a 20 character number which does not fit on a JavaScript number.
example: "00045678901234567890"
I would really like to apply a regular expression to the string formatting such as replace(/^0+/, "")
A blank zero number is acceptable.

Are there any formatting options for AW.Formats.String?

David Underbakke
June 23,
There are no parameters for AW.Formats.String. If you want some kind of custom conversion - you need to implement custom dataToText method - see the source code in /source/lib/formats/string.js
Alex (ActiveWidgets)
June 24,
Thanks for the update.
David Underbakke
June 24,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.