WHAT'S NEW?
Loading...

DataGrid Component as3 Part2


Tutorial Details
  • Judul: DataGrid Component as3 Part2
  • Difficulty: Beginner
  • Platform: Flash (Flash Player 10)
  • Bahasa Scripth: AS3
  • Software : Flash Professional CS4/Flash Professional CS5
  • Estimated Completion Time: 15 minutes
  • Created:Ricko Nada (Pustaka Flash)





live demo :

Scripth yang digunakan :
import fl.data.DataProvider;
import fl.controls.dataGridClasses.DataGridColumn;

myGrid.move(10,10);
myGrid.setSize(300, 100)

var col_Nama:DataGridColumn = new DataGridColumn("Nama");
myGrid.addColumn(col_Nama);

var col_Umur:DataGridColumn = new DataGridColumn("Umur");
myGrid.addColumn(col_Umur);
col_Umur.sortOptions = Array.NUMERIC;

var col_Pekerjaan:DataGridColumn = new DataGridColumn("Pekerjaan");
myGrid.addColumn(col_Pekerjaan);

myGrid.columns[0].width=100
myGrid.columns[1].width=50
myGrid.columns[2].width=150

var myData:Array = [{Nama: "John Jenkins", Umur: "31", Pekerjaan: "Programmer"},
{Nama: "Anna Watson", Umur: "28", Pekerjaan: "Docter"},
{Nama: "Susan McCallister", Umur: "29", Pekerjaan: "Koki"},
{Nama: "Joe Thompson", Umur:"32", Pekerjaan: "Jaksa"},
{Nama: "Bob Anderson", Umur:"31", Pekerjaan: "Sales"},
{Nama: "William Thompson", Umur:"2", Pekerjaan: "Bayi"},
{Nama: "Oscar Anderson", Umur:"3", Pekerjaan: "Bayi"}];

myGrid.dataProvider = new DataProvider(myData);

myGrid.rowCount = myGrid.length;



0 komentar:

Post a Comment