EasyCFM.COM ColdFusion Forums / Flex Development / preselecting the first row in a flex datagrid

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: preselecting the first row in a flex datagrid -- page: 1 2 3 4

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

stinasius
03-18-2008 @ 12:05 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 109
Joined: Jan 2007

sorry i thought i had attached the code my mistake. i have just sent u an email with the code attached.

Scarecrow
04-05-2009 @ 6:43 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 109
Joined: Oct 2004

I have not read the complete thread, so
sorry to jump in here, but

There is no need for the change function

1.  Create a variable, this will be used to set the selected row of the dg
private var currentIndex:int = 0;

2.  In the result fucntion that populates the dg
this.dgName.selectedIndex = this.currentIndex;

3.  The form fields (text), set the "text" attribute to
text="{this.dgName.selectedIndex.fieldName}"

This will then change the value when each row in the dg is selected.

Ken

www.scarecrowapplications.com

PAGE: 1 2 3 4

Website Designed and Developed by Pablo Varando.