jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox what does this mean in demo?

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • what does this mean in demo? #49172

    dailyblog
    Participant

    $(‘#combobox’).jqxComboBox({ selectedIndex: 0, source: dataAdapter, displayMember: “firstname”, valueMember: “notes”, itemHeight: 70, height: 25, width: 270,
    renderer: function (index, label, value) {
    var datarecord = data[index];
    var imgurl = ‘../../images/’ + label.toLowerCase() + ‘.png’;
    var img = ‘‘;
    var table = ‘<table style=”min-width: 150px;”><tr><td style=”width: 55px;” rowspan=”2″>’ + img + ‘</td><td>’ + datarecord.firstname + ” ” + datarecord.lastname + ‘</td></tr><tr><td>’ + datarecord.title + ‘</td></tr></table>’;
    return table;
    }
    });

    what does “data[index]” mean in custom renderer demo??
    if it should be “this.items[index].originalItem” ??

    what does this mean in demo? #49192

    Peter Stoev
    Keymaster

    Hi dailyblog,

    data[index] in the demo represents an Item from an Array which is called data and is built in the Demo, too. “index” which is an argument of the “renderer” function is the current rendered item’s index.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.