Need some help with sourcing data from a remote source and handling duplicated items and indicating that there are more results.

7 posts, 0 answers
  1. iCognition
    iCognition avatar
    71 posts
    Member since:
    Apr 2012

    Posted 13 Nov 2019 Link to this post

    I have managed to get the searching to work with our existing systems however i have noticed that if items with the same "Value" are returned at different levels. For example, if i am looking for people by their username/name so if i have a person named "sysadmin" who is also part of a group called "Administrators" they are returned at two different levels within the tree and selecting both of them results in the selection appearing multiple times within the textbox. Is there some way that i can link these two (or more) items?

     

    The other problem i am having is that when data is fetched from the server, we also provide an indicator that there are more matched results that are not returned in the search (because we are only displaying the first 20). The total number of matched results is returned as part of the response.

    e.g.

    {
      "Data": [/* 20 items */],
      "Total": 223
    }

     

    In our other dropdownlist selectors we use virtual scrolling to continuously fetch more results and in our grid and list view pages we use paging.

    Is there some way that i can indicate to a user that there are more items that could have been returned but weren't? Either by including some sort of paging functionality or appending an indicator of some kind to the item list.

  2. iCognition
    iCognition avatar
    71 posts
    Member since:
    Apr 2012

    Posted 14 Nov 2019 in reply to iCognition Link to this post

    After doing some more digging within the databound event I can see when the root of the tree is not showing all of the elements based on the information within the json response, however I cannot find anything to do something similar with each of the child nodes.
  3. Plamen
    Admin
    Plamen avatar
    3080 posts

    Posted 15 Nov 2019 Link to this post

    Hi,

    Straight to the points:

    DropDownTree component is designed to work with unique values for all its items so having the same values among some of its items will lead to unexpected behavior that is why such scenarios are currently not supported.

    As for the indicator that you need you could use the footer template as for example it is done in this documentation article.

    Regarding the last issue with the dataBound event - it is not quite clear so would you please elaborate a little bit what is not working correctly and what are you trying to achieve so we could think of a possible solution.

    Regards,
    Plamen
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. iCognition
    iCognition avatar
    71 posts
    Member since:
    Apr 2012

    Posted 17 Nov 2019 in reply to Plamen Link to this post

    Hi Plamen,

    The footer template solves part of my problem and i can use it to show a button to increase the size of the page being returned. However it appears to only work for the main list of items and not the contents of other items. 

    If i expand a group and the number of items shown is less than the total number on the server, i am unsure how i could indicate to the user that not all of the contents are being shown. 

    Optimally i would like to append a message to the sub-tree to tell the user that not all items are being shown.

     

    Thanks,

     

  5. Plamen
    Admin
    Plamen avatar
    3080 posts

    Posted 19 Nov 2019 Link to this post

    Hello,

    There is not such template for the sub nodes in the treeview. Please excuse us for this limitation of the widget.

    If you have further questions please let me know.

    Regards,
    Plamen
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  6. iCognition
    iCognition avatar
    71 posts
    Member since:
    Apr 2012

    Posted 19 Nov 2019 in reply to Plamen Link to this post

    I do notice that there is a databound event triggered when I expand a node to view its children, presumably because the datasource is doing another read. Is there an easy way for me to identify which node in the tree was responsible for the databound event? If so that would also solve my problem.

  7. Plamen
    Admin
    Plamen avatar
    3080 posts

    Posted 20 Nov 2019 Link to this post

    Hi,

    You can use the e.sender.dataItem(e.node) in the dataBound event as for example it is done here - https://dojo.telerik.com/@zdravkov/utovILoF

    Regards,
    Plamen
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top