jQuery UI Widgets Forums Lists ListBox dynamically loaded source needs to display as html

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

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

  • jbpd
    Participant

    I have a source that has a Value and Text array. The Text is html with an image.

    When testing and using the source as a hard typed list:
    var source = [
    { html: “

    jqxNumberInput

    “, title: ‘jqxNumberInput’ },
    { html: “

    jqxProgressBar

    “, title: ‘jqxProgressBar’ }
    ];

    as per the documentation of the “Text with icons” demo example code it works fine, because there’s the { html: “jkfds” } code, however when drawing from a json (dynamic) source, is there a way to tell the listbox that the “Text” field is html? so it displays properly.

    When it has html, it displays ok, but then there is always a mile-long horizontal scroll bar that appears, when it says html: as in the hard coded type it doesn’t have the scroll bar. Thus my need for the html: in the dynamic source.

    Thanks, Jeremy


    Peter Stoev
    Keymaster

    Hi Jeremy,

    I suggest you to to create a jqxDataAdapter plug-in which gets the JSON data. Then iterate through the jqxDataAdapter’s records(jqxDataAdapter has a property called records of type Array) and build a source object for the ListBox which sets the ‘html’ property. Then bind the ListBox to the source object as in the ‘Text with Icons’ sample.

    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.