:: Forum >>

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
Monday, June 23, 2008
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)
Tuesday, June 24, 2008
Thanks for the update.
David Underbakke
Tuesday, June 24, 2008

This topic is archived.


Back to support forum

Forum search