Set selection in Dashcode List Controller

Posted by wpearse on Stack Overflow See other posts from Stack Overflow or by wpearse
Published on 2010-05-08T22:23:21Z Indexed on 2010/05/08 22:28 UTC
Read the original article Hit count: 534

Filed under:
|
|

I have a list controller in my Dashcode project, it pulls its data from a dynamic source.

After my list controller has loaded its data I'd like to set it's selected index to 0 - so that information for the first item in the list is shown. I can't for the life of me figure out how to do this. I've tried:

function load()
{
    dashcode.setupParts();
    var list = document.getElementById("itemsList");
    //list.setSelectionIndexes(0); // nope
    //list.selectedIndex = 0; // nope
}

© Stack Overflow or respective owner

Related posts about safari

Related posts about dashcode