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
}
No need to write any code for that. Edit the properties for the list in the inspector and uncheck allow empty selection in the attributes tab. With no null selection allowed the first item in the list will be selected when the list loads.