Hi,
After a long time I wished to write a post again :)
This time I am writing a simple class but I think it could be very useful to someone. There have been some classes which were copying the data from a datagrid. I decide to write a class which copies only the selected data from the datagrid.
First you will have to set the allowMultipleSelection="true" of the datagrid you want to copy. Then use the following class to copy the selected data from the datagrid.
package com
{
import flash.system.System;
import mx.controls.DataGrid;
public class CopyToCB
{
public static var ccString:String;
public function CopyToCB()
{
}
public static function CopyData(dg:DataGrid):void{
ccString = new String();
for(var i:Number=0;i<dg.columncount;i++){
ccString += dg.columns[i].headerText + "\t";
}
ccString += "\n";
for each(var item:Object in dg.selectedItems){
for(var t:Number=0;t<dg.columncount;t++){
ccString += item[dg.columns[t].dataField] + "\t";
}
ccString += "\n";
}
System.setClipboard(ccString);
}
}
}
Do let me know if it helps you.
Cheers!
-Ravi
In this blog I will keep on sharing the new things about Flex, ActionScript, Sports and Movies, which I come across.
Tuesday, February 17, 2009
Tuesday, October 14, 2008
Direct Connection of Flex to MySql
Yesterday I came across ASQL which is a complete library for creating a connection between Flex 2 and MySql without using any kind of service (RPC, Messaging, etc.). This is a kind of revolutionary thing in developing data application with Flex 2.
I tried my hands with it and found really interesting. We can just pass the query string in our Flex code and can get the result from MySql database. This is simply amazing.
Thanks to Lukasz Blachowicz for creating such a cool library.
Cheers!
I tried my hands with it and found really interesting. We can just pass the query string in our Flex code and can get the result from MySql database. This is simply amazing.
Thanks to Lukasz Blachowicz for creating such a cool library.
Cheers!
Saturday, September 27, 2008
Open office Suite from SUN
Yesterday I was prompted by a Java update on my machine.
After downloading and installing the Java update I came to know that there is a new shortcut icon on my desktop for OpenOffice. That icon redirected me to download openoffice.
I was surprised to see an open source office suite. It is exactly like Microsoft office suite. There is almost everything you can imagine for an office suite.
There is WRITER for doc files, IMPRESS for presentations, BASE for database files, CALC for spreadsheets.
I haven't use this suite though, but I would say SUN ppl have done a great job.
Cheers!
After downloading and installing the Java update I came to know that there is a new shortcut icon on my desktop for OpenOffice. That icon redirected me to download openoffice.
I was surprised to see an open source office suite. It is exactly like Microsoft office suite. There is almost everything you can imagine for an office suite.
There is WRITER for doc files, IMPRESS for presentations, BASE for database files, CALC for spreadsheets.
I haven't use this suite though, but I would say SUN ppl have done a great job.
Cheers!
Subscribe to:
Posts (Atom)