Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Format columns in an ibiDataGrid [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Format columns in an ibiDataGrid [SOLVED]
 Login/Join
 
Member
posted
I haven't had any luck finding documentation on this, the wf_flex.pdf on the IBI site only has generic description of properties and no examples.

How do I format columns in an ibiDataGrid Flex app? I tried formatting the column in the fex that creates the xml but that didn't help.

I have several numeric columns that I want to format as "D9C" (in fex speak). They appear with comma's and two decimal places in Flex output.

This message has been edited. Last edited by: Tim Easley,
 
Posts: 29 | Registered: July 17, 2007Report This Post
Virtuoso
posted Hide Post
Try formatting with P9C in the fex and see if that works. Packed performs rounding and subsequent decimal notation a little nicer than Decimal sometimes.

There are number and decimal formatters available in actionscript that can also be used. I'll have to look for an example.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
You can add
<mx:NumberFormatter id="num" precision="0" rounding="up" decimalSeparatorTo="."
	        thousandsSeparatorTo="," useThousandsSeparator="true" useNegativeSign="true"/>


and then use a function to reformat that column:
num.format(object)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
I tried formatting in the fex and it did not seem to work at first, but when I looked at it again the following day it was working. Maybe the data was cached or I did not save when I thought I had.

So now the number is formatted D9C but is left justified. Apparently, the ibiDataGrid doesn't understand the text/left, numeric/right default alignment I take for granted in any other output format.

I don't think that adding alignment in the fex will help since the xml output isn't going to care about the stylesheet but I'll give it a go anyway.

Thanks for your help.

This message has been edited. Last edited by: Tim Easley,
 
Posts: 29 | Registered: July 17, 2007Report This Post
Virtuoso
posted Hide Post
You are right - the liagnment in the data grid has nothing to do with the fex , the XML, or stylesheets. It's all handled through properties in Flex. Add an ibiColumnStyle section to your datagrid to adjust the alignment (and other properties) of individual grid columns. You need a {} line for each column in your grid.

<ibi:ibiColumnStyle>	
    <![CDATA[	
       	{width:  90; textAlign: left;},	
	{width: 305; textAlign: right;},
         {width:  80; textAlign: center;}
             ]]>	
</ibi:ibiColumnStyle>


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Format columns in an ibiDataGrid [SOLVED]

Copyright © 1996-2020 Information Builders