header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
abhishek
Points:0
Posts:0

5/16/2011 3:25:22 AM

Title: how can we print s list data in flex


hew frnds,
plz see this sample example
I want to print all data in flex 4

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="library://ns.adobe.com/flex/mx"
   width="950" height="600" >
<s:layout>
<s:VerticalLayout/>
</s:layout>
 
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.printing.FlexPrintJob;
import mx.printing.FlexPrintJobScaleType;
protected function button1_clickHandler(event:MouseEvent):void
{
lstStudentData.dataProvider = arrCol_Div_Chars;
}
 
protected function btnPrint_clickHandler():void
{
  // WANT TO WRITE PRINT CODE HERE
}
 
]]>
</fx:Script>
 
<fx:Declarations>
<s:ArrayCollection id="arrCol_Div_Chars">
<fx:Object label='11' />
<fx:Object label='22' />
<fx:Object label='33' />
<fx:Object label='44' />
<fx:Object label='55' />
<fx:Object label='66' />
<fx:Object label='77' />
<fx:Object label='88' />
<fx:Object label='99' />
<fx:Object label='100' />
<fx:Object label='11' />
<fx:Object label='22' />
<fx:Object label='33' />
<fx:Object label='44' />
<fx:Object label='55' />
<fx:Object label='66' />
<fx:Object label='77' />
<fx:Object label='88' />
<fx:Object label='99' />
<fx:Object label='100' />
</s:ArrayCollection>
</fx:Declarations>
 
<s:VGroup>
<s:Button label="Show " click="button1_clickHandler(event)" />
<s:Button label="Print" click="btnPrint_clickHandler()" />
</s:VGroup>
 
<s:List width="900" height="500"  id="lstStudentData"   itemRenderer="compononts.CustomListItemRenderer"
useVirtualLayout="true"   >
<s:layout >
<s:TileLayout requestedColumnCount="2" horizontalAlign="center" verticalAlign="middle"
   />
</s:layout>
 
</s:List>
 
</s:WindowedApplication>



1
Brad
Points: 750
Posts:0
5/16/2011 6:36:37 AM



you can look at this similar question to print data in flex
http://askmeflash.com/qdetail/881/how-to-print-in-air-flex

2
abhishek
Points: 0
Posts:0
5/16/2011 10:23:14 PM



tht example is not working in flex 4


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 8+7 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions