Wednesday, November 5, 2008

Hi Guys , I recentally found a cool trick. the trick is How you will call external method from datagrid itemrender that do some action on your current datagrid.


I am posting a simple Example that is the Answer of this Question. By using this Code your can perform any action on datagrid from that own datagrid ItemRenderButton or Image.

Code is as Follows

     mx:Script
import mx.collections.ArrayCollection;
         import mx.controls.Alert;
            [Bindable]private var myDP:ArrayCollection = new ArrayCollection([
               {label1:"Order #2314", quant:3, Sent:true},
               {label1:"Order #2315", quant:3, Sent:false} ]);               
            public function showRowID():void{
             Alert.show("My selected row is"+myDG.selectedIndex.toString());
            }
        
    mx:Script

    mx:DataGrid id="myDG" dataProvider="{myDP}" variableRowHeight="true"
       mx:columns
          mx:DataGridColumn dataField="label1" headerText="Order #"
          mx:DataGridColumn dataField="quant" headerText="Qty"
            mx:itemRenderer
              mx:Component
mx:Button label="{'Click me'+data.quant}" click="{outerDocument.showRowID();}"
      mx:Component
            mx:itemRenderer
            mx:DataGridColumn
       mx:columns 
    mx:DataGrid

Hi Guys I hope every body doing great things in Flex. We all know that FLEX 3.0 has the feature of module. By Using module you can make your application in parts , I will discuss this concept later in my blog . right now i am awaring you about how to reload your module in Flex 3.0 , technically module reloading module is not possible but you can reload it each time at the time of Loading.

When you unload your module and again when you load your module you just have to add one random number with the module url. By Using the ramdom number each time module loads its data as Freash or wiht new swf. 
The Code is as follows Right now i am not posting the live example but soon i will post.

yeh!  code is 

ModuleLoader id="Mymodule" ready='somefunction'

when your assign the url to Module set url like this 

Mymodule.url='somepath/mymodule.swf?'+math.random();

this code load freash module or swf each time when you load the module or swf.




Tuesday, November 4, 2008

Hi Guys Well every one Know how to use Hand Cursor in LinkButton and a Simple Button but if You want to make a Label or Text as Button than you can easily do that like add some click event on Click of that Label or TextField but by buttonMode true or by useHandCursor  property set to true  you can't get HandCursor Over a Label or TextField than at Last Use This Property as Well.


Label text='Searching' buttonMode='true' mouseChildren='false' useHandCursor='true'

By setting the mouseChildren property false you get handCursor Over a Label.

Hi Guys , I hope every one doing great in flex 2.0 0r Flex 3.0, every one the action script 3.0 but i am sharing some that cool thing that can increase your Flex Development .
I recentally found some hot and usefull flex 3.0 Shortcut keys that can really help you in your Development so Use this keys get Fast Development in Current Flex World.