Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in /home/vaishali/public_html/wp-includes/functions.php on line 408
Creativity Rules » 2005 » December

Archive for December, 2005

Set Focus on a Cell in Datagrid in Flex 2.0

Thursday, December 15th, 2005

To set focus on a particular cell in Datagrid in Flex use the setFocusedCell(object,boolean) function. The object requires two properties itemIndex and columnIndex. Column index as the name signifies is the index or the column number of the column you want to select. Item index is the index or the row number of the row you want to select.

So your code would look something like this (dg is the instance name of the DataGrid):

The following method is for Flex 2 Beta 1:

var __focusedCell:Object = new Object();
__focusedCell.itemIndex = 1;
__focusedCell.columnIndex = 2;
dg.setFocusedCell(__focusedCell,true);

The following method is for Flex 2 Beta 2:

var __focusedCell:Object = new Object();
__focusedCell.rowIndex = 1;
__focusedCell.columnIndex = 2;
dg.setEditedItemPosition(__focusedCell);

So the above code would select the cell of 2nd row and the 3rd column. Remember indexes start from 0 and not 1 :)

Dynamic Text and Masking in Flash

Thursday, December 15th, 2005

Ever cracked your brains out wondering why your dynamic text field does not show the text when its masked??? I have been struggling with this problem from some time now.

All you need to do is embed characters. Select character sets that you want to embed from the embed option in the text field properties. Characters that you have embeded will be shown … none others!!