jQWidgets Forums

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts

  • ice79
    Participant

    matthewmoon
    if you want to check some of listbox’s items before greating of listbox via JSON
    you can create array like this (in PHP):

    $listboxitems[]=array(id’=>’some id’, ‘label’=>’some label’, ‘checked’=>1(checked) or 0(unchecked)) //’checked’ value is numeric (not string)

    in JavaScript you create something like this:
    var source =
    {
    datatype: “json”,
    datafields: [
    { name: ‘id’ },
    { name: ‘label’ },
    { name: ‘checked’ },
    ],
    id: ‘id’,
    localdata: data.listboxitems
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    $(‘#listbox’).jqxListBox({source: dataAdapter, displayMember: ‘label’, valueMember: ‘id’, height: ‘200px’, checkboxes: true, width: ‘290px’});

    and your items will be checked acording ‘checked’ values

    in reply to: Word wrapping the text Word wrapping the text #79549

    ice79
    Participant

    found a better way in

    just add property to your Listbox: autoItemsHeight: true

    in reply to: Word wrapping the text Word wrapping the text #79548

    ice79
    Participant

    The only one variant to prevent of horisontal scroll (i’ve found) (example listbox width : 250px) :

    1) insert lines in source of listbox via { html: ‘<div class=”listboxline”>’+ your text+ ‘</div>’ … }
    2) in your css – define
    .listboxline {
    width: 200px;
    white-space: normal;
    }
    3) ajust width of ‘.jqx-listitem-element’ via javascript after Listbox is created (i set width=200px)
    example

    in reply to: Bug in Inline Editor Bug in Inline Editor #77992

    ice79
    Participant

    this bug exist in firefox v38.4.0

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