Selecting multiple cells and rows in flex AdvancedDataGrid
You can use the allowMultipleSelection property.
It is a Boolean type. If it is true you can select multiple item at the same time.
you will use selectionMode property with the allowMultipleSelection property to configure multiple selection. The selectionMode property has following values: none, songleRow, multipleRows, singleCell, multipleCells. You will use the shift key and ctrl key for selecting multiple rows and cells.
Example:
<mx:AdvancedDataGrid allowMultipleSelection="true" selectionMode="multipleCells"></mx:AdvancedDataGrid>
What is difference between $var and $$var
$var is a variable and $$var is a Reference or Dynamic.
A normal variable is set with a
statement such as:
$var = 'hello';
A variable variable takes the value of a variable and
treats that as the name of a variable. In the above
example, hello, can be used as the name of a variable by
using two dollar signs. i.e.
$$var = 'world';
At this point two variables have been defined and stored in
the PHP symbol tree: $y with contents "hello" and $hello
with contents "world". Therefore, this statement
echo "$var ${$var}";
produces the exact same output as:
echo "$y $var";
i.e. they both produce: hello world.
Automatically Add Blog Posts to Your Facebook Fan Page Wall
In a few simple steps, here’s how you can import your blog (using the RSS feed) into a Facebook page (rather than profile).
Step 1
Sign into Facebook with a profile that has admin privileges for the page you want to add your blog to and navigate to the fan page.
Step 2
Click on the “Edit Page link”
Step 3
Scroll down to the Notes application and click on the “Edit” link. If the notes application is not there you will have to add it using the more applications link at the bottom of the page.
Step 4
On the right hand side there will be a link entitled “import a blog”. Click on it.
Step 5
Enter the url of the rss feed for your blog. For most blogs, this will simply be the address of your blog’s home page. Click the “Start Importing” Button.
Step 6
If you have entered the correct url for your blog, a preview your blog posts will appear. If you are happy with the import, click “confirm import”.
Now whenever you post on your blog, a new note will be posted on you fan pages wall, meaning that your fan page is kept up to date and relevant.
Illegal override of FlexModuleFactory in mx.core.FlexModuleFactory.
StyleManager.loadStyleDeclarations("yourexternalstyles.swf");
VerifyError: Error #1053: Illegal override of FlexModuleFactory in mx.core.FlexModuleFactory.at global$init()
PDF to Word For Free
I was looking for a software to convert pdf to word from a long time but could never find one which converted all the pages exactly the same as in Pdf. http://www.download3000.com/download_48391.html is amazing!! Thanks guys
How to add a tooltip on every Row of a flex DataGrid
Problem
How to have tooltip on every Row of a flex DataGrid on mouseOver
Solution
Enable showDataTips property for every DataGridColumn that you want to enable this functionality on and also need to have a dataTipFunction function on the DatGrid itself.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
initialize="init();">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var arrData:ArrayCollection = new ArrayCollection();
private function init():void{
arrData.addItem({team:"Manchester united",country:"England"});
arrData.addItem({team:"Barcelona",country:"Spain"});
}
private function onBuildToolTip(item:Object):String{
var str:String = "";
if (item != null) {
str = str + "Team : " + item.team + "\n";
str = str + "Country : " + item.country + "\n"
}
return str;
}
]]>
</mx:Script>
<mx:DataGrid id="dgd" dataProvider="{arrData}" visible="true"
dataTipFunction="onBuildToolTip">
<mx:columns>
<mx:DataGridColumn dataField="team" headerText="Team"
showDataTips="true" />
<mx:DataGridColumn dataField="country" headerText="Country"
showDataTips="true" />
</mx:columns>
</mx:DataGrid>
</mx:Application>
Centering a PopUp in Flex
If you are using PopUpManager and TitleWindow to create a popup window in Flex, you have probably run across this problem already. If you simply use 'this' as the parent display object then the popup is 'centered' according to the parent component specified (instead of to the complete stage). If you want to center your popup in the middle of your application screen you should specify 'Application.application' or 'this.parentApplication'.
PopUpManager.createPopUp(UIComponent(this.parentApplication),
ProgressWin, true) as ProgressWin;
Using Spark Containers in MX Navigators
Problem
The children of Halo navigators must implement INavigatorContent.
Solution
If you want to use the new spark containers you need to wrap them in, or just use spark.components.NavigatorContent .
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<mx:ViewStack id="vs" width="400" height="200">
<s:NavigatorContent width="100%" height="100%"
<s:layout>
<s:VerticalLayout/>
</s:layout>
<s:Button label="vertical button 1"/>
<s:Button label="vertical button 2"/>
<s:Button label="vertical button 3"/>
</s:NavigatorContent>
<s:NavigatorContent width="100%" height="100%"
<s:layout>
<s:HorizontalLayout/>
</s:layout>
<s:Button label="horizontal button 1"/>
<s:Button label="horizontal button 2"/>
<s:Button label="horizontal button 3"/>
</s:NavigatorContent>
</mx:ViewStack>
<mx:ToggleButtonBar dataProvider="{vs}"/>
</s:Application>
Receiving data in response to file upload in Flex using FileReference
Problem
After uploading data to a server via Flex i.e. FileReference.upload, is the a way to receive data back from the server in response to your upload. A common requirement. e.g. Upload a file for processing, server returns results (typically status).
Solution
The is a solution but it requires the latest version of flash player (flash player build version greater than 9.0.28).
All you need to do is to add a listener on your FileReference object:
fileReference.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, responseHandler);
private function responseHandler( evt:DataEvent ) :void
{
var response:XML = XML( evt.data );
}
Flex text input that accepts number only
Problem
Need a code that only accepts numbers. Upon inputting, the code must check
if it is number, if not, it must remove the entered key or not enter
it at all
Solution
Set the restrict property on the TextInput class to "0-9"
<mx:TextInput id="textInput"
restrict="0-9"
widthInChars="20"
maxChars="20" />