Adobe Dreamweaver Forums



Last 10 THreads :         Help with navigation (Last Post : Jiva Mukta - Replies : 0 - Views : 1 )           »          Why is this not working!!! (Last Post : Boxing Boom - Replies : 3 - Views : 4 )           »          CSS: Mystery IE and Firefox issue (Last Post : Codesonic - Replies : 0 - Views : 1 )           »          Update scrollbar on text area? (Last Post : Handycam - Replies : 0 - Views : 1 )           »          debugger causing browser to crash (Last Post : thmunson - Replies : 4 - Views : 5 )           »          Passing variable between components (Last Post : Amy Blankenship - Replies : 3 - Views : 4 )           »          Flash Slide Presentation and CS4 motion tween (Last Post : pivovar - Replies : 0 - Views : 1 )           »          Please point me to the correct topic section of thisForum (Last Post : dzedward - Replies : 9 - Views : 10 )           »          Cookies and cflogin (Last Post : idesdema - Replies : 7 - Views : 9 )           »          left join won't work in query of query? (Last Post : Amm85 - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 10-31-2008, 06:22 PM
iceflex
 
Posts: n/a
Diggs:
Default ItemRenderer

Hi,
I'm new in Flex, I need to add number validations to my ItemRenderer in the
DataGridColumn

<mxataGridColumn dataField="value" itemRenderer="mx.controls.TextInput"
headerText="Header" />

Can someone point me to a good example, please?
I appreciate your help..


Text



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-31-2008, 06:22 PM
Greg Lafrance
 
Posts: n/a
Diggs:
Default Re: ItemRenderer

Use a labelFunction:

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.events.DataGridEvent;
import mx.collections.*;

private var myDPColl:ArrayCollection;

[Bindable] private var myDP:ArrayCollection = new ArrayCollection([
{Album:'Slanted and Enchanted', Price:11.99},
{Album:'Crooked Rain, Crooked Rain', Price:10.99},
{Album:'Wowee Zowee', Price:12.99}
]);

private function priceLabelFunction(item:Object,
columnataGridColumn):String{
return nmbFormatter.format(item.Price);
}
]]>
</mx:Script>
<mx:NumberFormatter id="nmbFormatter" precision="2"
rounding="up" decimalSeparatorTo="*"/>
<mxataGrid dataProvider="{myDP}" id="myGrid" width="100%">
<mx:columns>
<mxataGridColumn minWidth="200" dataField="Album" />
<mxataGridColumn width="75" dataField="Price"
labelFunction="priceLabelFunction"/>
</mx:columns>
</mxataGrid>
</mx:Application>

Reply With Quote
  #3 (permalink)  
Old 10-31-2008, 06:22 PM
iceflex
 
Posts: n/a
Diggs:
Default Re: ItemRenderer

Thanks, Greg

Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 07:47 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk