Welcome, Guest. Please login or register.
Did you miss your activation email?
02/07/12, 08:34
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flex, Air, FlashBuilder, Catalyst (Moderators: ..:: Mazhar Hasan ::.., kofi addaquay)
| | |-+  Adding Picture and Pagination on dataGrid Flex.. :)
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Adding Picture and Pagination on dataGrid Flex.. :)  (Read 1372 times)
hinomotoblade
Seasoned Programmer
***
Posts: 131


Flash Never Die :D


View Profile
« on: 01/27/10, 17:29 »

Hello can i include the picture to my dataGrid?..
And how about pagination?.. like we use mysql_limit in dataGrid.. Smiley

About the dataProvider on my dataGrid i assign like this.. Smiley

Code:
<mx:Object ID="1" NAMA="Yogie Aditya" PESAN="Hehehehe SIP"/>
<mx:Object ID="2" NAMA="Hikari" PESAN="Waaa XD"/>
<mx:Object ID="3" NAMA="Hikaru Lala" PESAN="Iyah Sip Cuy"/>

Thank you.. Smiley

Really need help, Cheesy
Logged

Huihihi~ Cheesy
kofi addaquay
Global Moderator
Senior Programmer
*****
Posts: 450



View Profile WWW Email
« Reply #1 on: 01/27/10, 17:47 »

a friend of mine wrote a sample application to demonstrate pagination. check it out here

http://examples.augiemarcello.com/Flex2/Pagination/Pagination.html

right click and do view source code to see the code. that might help you out.

Kofi
Logged
hinomotoblade
Seasoned Programmer
***
Posts: 131


Flash Never Die :D


View Profile
« Reply #2 on: 01/27/10, 19:04 »

Thank you very much kofi.. Cheesy

How about adding picture in my dataGrid?.. Because i am using an Object for the data.. Smiley
Logged

Huihihi~ Cheesy
kofi addaquay
Global Moderator
Senior Programmer
*****
Posts: 450



View Profile WWW Email
« Reply #3 on: 01/27/10, 23:41 »

the code you are using is not fully right. a datagrid needs to have a source / dataprovider. i dont see that in your code.

you can create an array collection and using the object as your source

<mx:ArrayCollection id="myAC">
    <mx:source>
           <mx:Object theUrl="http://kofi.com" theName="someName"/>
    </mx:source>
</mx:ArrayCollection>

you then set your datagrids dataprovider to this arraycollection. one quick way to access your object is like this ( using binding )

{myAC.getItemAt(0).theName}


About your image. datagrids dont show images by default. you will have to create a custom renderer for your datagrid to show images. look into the documentation on how to create a datagrid item renderer.


Kofi
Logged
hinomotoblade
Seasoned Programmer
***
Posts: 131


Flash Never Die :D


View Profile
« Reply #4 on: 01/28/10, 20:57 »

Yes thank you kofi.. Smiley
Logged

Huihihi~ Cheesy
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything