How to get items from ClusterItem

2 posts, 0 answers
  1. Nikola
    Nikola avatar
    1 posts
    Member since:
    Aug 2012

    Posted 18 Sep 2012 Link to this post

    I am displaying some items on the map. Some of them can have the same location and cluster is shown. I can zoom in but I will not see them because they are on the same location and cluster is still shown. I would like to show information about them when mouse over the cluster. It would be something like tooltip. While debugging I can see child items from ClusterItem object but on coding there is no Items property for ClusterItem class. How can I take items from Cluster to show information about them ?

    Thanks anyway.
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 21 Sep 2012 Link to this post

    Hello Nikola,

    You can use ClusterItem.ClusterState with the ClusterItem.HideExpanded property. When the ClusterState is Expanded then the ClusterItem shows its items. Also when at the same moment you set the HideExpanded to 'true' then the Cluster will be hidden.
    And you can use the ClusteredDataSource.Collapse method to hide the cluster's items.
    For more information please take a look at the following documentation topic:

    I have attached a sample solution which shows cluster's items by right mouse button click and it shows cluster again by left mouse button click on any item of cluster. I hope it helps.

    Andrey Murzov
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Back to Top