mixing calls to selectedItem and selectedIndex in the same frame is pretty
buggy.  It's best to use either selectedIndex or selectedItem, but not
both.  You'll get much more consistent results that way.

HTH,

Sam

On Fri, Feb 29, 2008 at 2:56 PM, guitarguy555 <[EMAIL PROTECTED]> wrote:

> In my application, I have a datagrid that is bound to XML data.  The
> datagrid has a corresponding form that contains the details.  When
> the user clicks on a row in the datagrid the form populates with the
> values from the DataGrid's selectedItem.
>
> I want to programatically select the first row in my DataGrid when
> the application loads.
>
> In order to do this, I have to call validateNow() and scrollToIndex()
>
> eg.
>
> dg.selectedIndex = 0;
> dg.validateNow();
> dg.scrollToIndex(0);
>
>

-- 
-----------------------------------------------------------------
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer.
 Position is in the Washington D.C. metro area. Contact
[EMAIL PROTECTED]

Reply via email to