jQuery UI Widgets Forums Lists DropDownList category is not working filter

This topic contains 4 replies, has 2 voices, and was last updated by  Dimitar 9 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • category is not working filter #70289

    mustafa
    Participant

    hello
    category search does not work !!

    and when i use search bar, notting appears. list appears empty.

        $("#dropListItemsForInvoice").jqxDropDownList({
            source: GetInvoiceItemsHierarchy(),
            promptText: "Select Item",
            displayMember: "Name",
            valueMember: "InvoiceItemID",
            height: "34px",
            width: "135%",
            dropDownHeight: 500, 
            dropDownWidth: 510,
            //selectedIndex: 0,
            filterable: true,
            dropDownHorizontalAlignment: 'left',
            theme: "web",
        });    
    function CategoriesOfItemsPrepare(data) {// Invoice
    
        var source = [];
    
        if (data.length > 0 || data != "undefined") {
            for (var i = 0; i < data.length; i++) {
                source.push({ html: "<div style='  margin-left:30px; padding: 1px;'><div id=" + data[i].InvoiceItemID + ">" + data[i].Code + " | " + data[i].Name + "</div>", group: '' + data[i].Code + " | " + data[i].Name + '' });
    
            }
        }
        return source;
    }
    category is not working filter #70297

    Dimitar
    Participant

    Hello mustafa,

    This feature works on our side:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="../../scripts/demos.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
    </head>
    <body>
        <div id='content'>
            <script type="text/javascript">
                $(document).ready(function () {
                    var source = [
                    // Business & Investing
                        {html: "<div style='padding: 1px;'><div>Title: Do the Work</div><div>Author: Steven Pressfield</div></div>", title: "Do the Work", group: "Business & Investing" },
                        { html: "<div style='padding: 1px;'><div>Title: Think and Grow Rich</div><div>Author: Napoleon Hill</div></div>", title: "Think and Grow Rich", group: "Business & Investing" },
                        { html: "<div style='padding: 1px;'><div>Title: The Toyota Way to Continuous...</div><div>Author: Jeffrey K. Liker</div></div>", title: "The Toyota Way to Continuous...", group: "Business & Investing" },
                        { html: "<div style='padding: 1px;'><div>Title: Redesigning Leadership </div><div>Author: John Maeda</div></div>", title: "Redesigning Leadership ", group: "Business & Investing" },
                    // Computer & Internet Books
                        {html: "<div style='padding: 1px;'><div>Title: MacBook Pro Portable Genius</div><div>Author: Brad Miser</div></div>", title: "MacBook Pro Portable Genius", group: "Computer & Internet Books" },
                        { html: "<div style='padding: 1px;'><div>Title: Social Media Metrics Secrets</div><div>Author: John Lovett</div></div>", title: "Social Media Metrics Secrets", group: "Computer & Internet Books" },
                        { html: "<div style='padding: 1px;'><div>Title: iPad 2: The Missing Manual</div><div>Author: J D Biersdorfer J.D</div></div>", title: "iPad 2: The Missing Manual", group: "Computer & Internet Books" },
                    // History
                        {html: "<div style='padding: 1px;'><div>Lincoln and His Admirals</div><div>Author:Craig L. Symonds</div></div>", title: "Lincoln and His Admirals", group: "History" },
                        { html: "<div style='padding: 1px;'><div>The Dogs of War: 1861</div><div>Author:Emory M. Thomas</div></div>", title: "The Dogs of War: 1861", group: "History" },
                        { html: "<div style='padding: 1px;'><div>Cleopatra: A Life</div><div>Author:Stacy Schiff</div></div>", title: "Cleopatra: A Life", group: "History" },
                        { html: "<div style='padding: 1px;'><div>Mother Teresa: A Biography</div><div>Author:Meg Greene</div></div>", title: "Mother Teresa: A Biography", group: "History" },
                        { html: "<div style='padding: 1px;'><div>The Federalist Papers</div><div>Author:John Jay</div></div>", title: "The Federalist Papers", group: "History" },
                     ];
                    // Create a jqxDropDownList
                    $("#jqxWidget").jqxDropDownList({ source: source, width: '300', height: '35', selectedIndex: 0, filterable: true });
                });
            </script>
            <div id='jqxWidget'>
            </div>
        </div>
    </body>
    </html>

    Please make sure you are using the latest version of jQWidgets.

    Best Regards,
    Dimitar

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

    category is not working filter #70300

    mustafa
    Participant

    thank you for reply dimitar

    category is not working filter #70309

    mustafa
    Participant

    hi dimitar
    There is a problem
    The first option comes down

      $("#dropListItemsForInvoice").jqxDropDownList({
            source: GetInvoiceItemsHierarchy(),
            promptText: "Select Item",
            displayMember: "Name",
            valueMember: "InvoiceItemID",
            height: "34px",
            width: "135%",
            dropDownHeight: 500, 
            dropDownWidth: 510,
            selectedIndex: 0, 
            dropDownHorizontalAlignment: 'left',
            theme: "web",
        });
    
        $("#dropListItemsForInvoice").jqxDropDownList('insertAt', { label: 'Select Item', value: 0 }, 0);

    thank you

    category is not working filter #70334

    Dimitar
    Participant

    Hi mustafa,

    The new item is inserted where you specified – at index 0 – and is the first item. Unfortunately, it cannot be inserted outside a group (category), if that is what you are asking.

    Best Regards,
    Dimitar

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

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

You must be logged in to reply to this topic.