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.
6 Answers, 1 is accepted
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
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,
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
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.
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