Try
createSort();
var cursor:IViewCursor = myXMLListCollection.getCursor();
var values:Object = {FreeText: nameInput.text};
cursor.findFirst(values);
var mark:CursorBookmark = cursor.bookmark;
var index:int = mark.getViewIndex();
dg.selectedIndex = index;
That should work, when you use the findFirst() method if it finds something it positions the cursor's current pointer to it. The you use the bookmark to get the index.
Peace, Mike
On 4/3/06, mepaninaresh <[EMAIL PROTECTED]> wrote:
Any ideas how I can get hold of the index in order to set
selectedIndex.
Sample code :-
createSort();
var cursor:IViewCursor = myXMLListCollection.getCursor();
var values:Object = {FreeText: nameInput.text};
cursor.findFirst(values);
Thanks for any help.
--- In [email protected], "Matt Chotin" <[EMAIL PROTECTED]> wrote:
>
> Setting the selectedIndex should work. Then you can set the
vPosition
> to scroll to it.
>
> Matt
>
> -----Original Message-----
> From: [email protected]
[mailto:[email protected]] On
> Behalf Of mepaninaresh
> Sent: Friday, March 31, 2006 5:55 AM
> To: [email protected]
> Subject: [flexcoders] DataGrid Find Function
>
> I have implemented the find function, all works great. Is there
any
> way of setting the selectedIndex of the DataGrid.I want to
highlight
> and position?
>
> Regards,
> Naresh.
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
What goes up, does come down.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

