Calendar

January 2010
S M T W T F S
« Dec   Feb »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Validate Data in DataGrid

itemEditBegin – Fired when you click on an editable cell of the datagrid (also when the editedItemPosition is set on an editable DataGrid)
itemEditBeginning – Fired when the mouse is released
itemEditEnd – Fired when the edit is committed / editor is destroyed there by terminating the edit session.

1
2
3
4
5
6
7
8
9
<mx:DataGrid editable=”true” id=”datagrid” x=”105″ y=”85″ [...]

Creating a view cursor on an ArrayCollection in Flex

ปกติเวลาจะหา data จาก ArrayCollection ก็จะวนลูปแล้ว if เอา วันนี้เล่นเน็ตไปมาเลยไปเจอว่าเค้าทำกันแบบนี้ได้

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
< ?xml version="1.0" encoding="utf-8"?>
<!– http://blog.flexexamples.com/2008/04/15/creating-a-view-cursor-on-an-arraycollection-in-flex/ –>
<mx :Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white"
creationComplete="init();">
 
</mx><mx :Array id="arr">
[...]

Cloning ArrayCollection

There are plenty of occasions where you might want to be able to create an exact clone of a complex/nested data objects, without your new object simply referencing the old one’s values. To do this, you need to force the creation of new values and references. Depending on the complexity of the data stored, this [...]