jQuery UI Widgets Forums Lists DropDownList insertAt with rendered list items.

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 8 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • insertAt with rendered list items. #86553

    Weibing
    Participant

    Hello,

    I’m attempting to insert an item at the top of a dropdown, but this dropdown is using the renderer function to customize the look of the list items. Is there a way to use insertAt with rendered list items, perhaps with the html field? I have not been successful. Many thanks.

    B

    my dropdown renderer:

    renderer: function (index, label, value) {
    var datarecord = empSource.records[index];
    var imgurl = ‘http://lex.lsbc.org/extract/staff/’ + datarecord.staff_pic;
    var img = ‘‘;
    var table = ‘<div style=”float:left; width:90px;”>’ + img + ‘</div> <div>’ + datarecord.preferred_nm + ‘</div></br><div>’ + datarecord.title + ‘</div>’
    return table;
    }

    insertAt with rendered list items. #86685

    Dimitar
    Participant

    Hello Weibing,

    When you add a dropdownlist item with insertAt, it will automatically be rendered using the renderer callback function. Here is an example: https://www.jseditor.io/?key=jqxdropdownlist-add-new-rendered-item.

    Best Regards,
    Dimitar

    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.