jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree Search/Filter for jqxTree

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

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Search/Filter for jqxTree #26357

    dominicthoppil
    Participant

    Hi

    Is it possible to give a search/filter for jqxTree.  I couldn’t find any documentation regarding this. If it not possible directly, is there any work around ? In my tree there may be more than 500 items.  So users will ask for some search/filter. Looking for your reply.

    Regards

    Dominic

    Search/Filter for jqxTree #26362

    Dimitar
    Participant

    Hello Dominic,

    Unfortunately, there is no such functionality in jqxTree.

    Best Regards,
    Dimitar

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

    Search/Filter for jqxTree #26365

    dominicthoppil
    Participant

    Hi

    Thank you for your reply.

    I was trying to create a workaround. I was partially succeeded and it may not the best as i am not an expert in jquery. If i found an item which is at the bottom of the tree , how can i set the scroll bar to that position. The selection is in that item, but scroll bar is not moving based on the selection. Do you have any suggestions ?

    If you have some around , please share.

    var allItems;
    var list = new Array();
    var itemselected = false;
    $("#txtsearch").keypress(function () {
    itemselected = false;
    if (allItems == null) {
    allItems = $('#jqxtree').jqxTree('getItems');
    $.each(allItems, function () {
    list.push(this.value);
    });
    searchitems();
    }
    else {
    searchitems();
    }
    });
    function searchitems() {
    $.map(list, function (value) {
    if (itemselected == true) return;
    d = $('#txtsearch').val();
    var search = new RegExp(d, "gi");
    if (value.match(search)) {
    $.each(allItems, function () {
    if (itemselected == true) return;
    if (this.value.toUpperCase() == value.toUpperCase()) {
    $('#jqxtree').jqxTree('selectItem', this);
    $('#jqxtree').jqxTree('expandItem', this);
    itemselected = true;
    };
    });
    return value;
    }
    return null;
    });
    }

    Regards
    Dominic

    Search/Filter for jqxTree #26392

    dominicthoppil
    Participant

    Hi

    Any updates on this ?

    Regards
    Dominic

    Search/Filter for jqxTree #26470

    Dimitar
    Participant

    Hi Dominic,

    There is no built-in method in jqxTree for scrolling to a particular item.

    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.