Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Initial selected object of list grid

    Hello,

    Is there a way to set the initial selected row of a list grid in the initial JavaScript constructor of the list grid? I´m looking for something like a hypothetical parameter "selectedRecord".

    Example:
    Code:
    isc.ListGrid.create({
        ID: "countryList",
        width:500, height:224, alternateRecordStyles:true,
        selectedRecord: 3, //**** hypothetical parameter selectedRecord
        data: countryData,
        fields:[
            {name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
            {name:"countryName", title:"Country"},
            {name:"capital", title:"Capital"},
            {name:"continent", title:"Continent"}
        ],
        canResizeFields: true
    })
    Yes I know, that I can execute

    Code:
    countryList.selectRecord(3)
    But for my use case it would be useful to set it in the initial JavaScript constructor.

    Regards Thomas

    #2
    The only other option is to declare the selection in the data itself (see ListGrid.selectionProperty).

    Comment

    Working...
    X