Skip to Content
avatar image
Former Member

Select list item programmatically is not working

Hi ,

I want to select first item in my master list. I used the below code for that.

list = this.getView().byId("myList");

list.setSelectedItem(list.getItems()[0], true /*selected*/, true /*fire event*/);

But it's not working. Any one faced this issue? Please help

Thanks

Saranya

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 13, 2017 at 11:14 PM

    HI

    I do not think that it is a good idea to do things that way that you have.

    Can you please consider this? http://jsbin.com/mebeziv/edit?js,output

    Thanks

    -D

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 14, 2017 at 12:43 PM

    Dear,

    First check whether list is loaded. You' can use uploadcompleted event, with in you can perform above activi

    Add comment
    10|10000 characters needed characters exceeded