check this link http://www.cflex.net/showFileDetails.cfm?ObjectID=298&Object=File&ChannelID=1
On Dec 23, 12:08 am, koteshwar Rao myneni <[email protected]> wrote: > The best solution for this as my knowledge is..convert the entire data > in the datagrid to a excel file and get print from there..rather than > using the datagrid print in flex. > > On Dec 22, 10:28 pm, Vattem <[email protected]> wrote: > > > I need to print a datagrid values in a single page...i used a sample > > programme..but i am unable to fix the height of datagrid...i.e if > > datagrid's length is increasing due to scroll bar facility i am unable > > to see all values in that datagrid at a time....can anyone help me to > > solve this problem...i used the following code:::: > > <?xml version="1.0"?> > > <!-- printing\DGPrint.mxml --> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> > > > <mx:Script> > > <![CDATA[ > > import mx.printing.*; > > > // Create a PrintJob instance. > > private function doPrint():void { > > // Create an instance of the FlexPrintJob class. > > var printJob:FlexPrintJob = new FlexPrintJob(); > > > // Start the print job. > > if (printJob.start() != true) return; > > > // Add the object to print. Do not scale it. > > printJob.addObject(myDataGrid, > > FlexPrintJobScaleType.SHOW_ALL); > > > // Send the job to the printer. > > printJob.send(); > > } > > ]]> > > </mx:Script> > > > <mx:VBox id="myVBox"> > > <mx:DataGrid id="myDataGrid" width="300"> > > <mx:dataProvider> > > <mx:Object Product="Flash" Code="1000"/> > > <mx:Object Product="Flex" Code="2000"/> > > <mx:Object Product="ColdFusion" Code="3000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > <mx:Object Product="JRun" Code="4000"/> > > </mx:dataProvider> > > </mx:DataGrid> > > <mx:Button id="myButton" > > label="Print" > > click="doPrint();"/> > > </mx:VBox> > > </mx:Application> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

