Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2170
Looping Through TileGroupsCollection
posted

You can retrieve a group using the key but not the index. How would you go about looping through the TileGroupsCollection and retrieving the Group for each index?

Parents
  • 21795
    Offline posted

    Hello Roger,

    Thank you for posting in our forum.

    You can get a specific TileGroup from tiles group collection by index and by key. You may use code like this:

    TileGroup myGroup = this.ultraLiveTileView1.Groups.Add("MyGroupKey", "My Group Text");

     

    // Get TileGroup by index

    int index = myGroup.Index;

    TileGroup myGroupRefByIndex = this.ultraLiveTileView1.Groups[index];

     

    // Get TileGroup by key

    string key = myGroup.Key;

    TileGroup myGroupRefByKey = this.ultraLiveTileView1.Groups[key];

    If you need to get the indexes of all the TileGroups you may use code like this:

    // Get all TileGroups keys and indexes

    Dictionary<int, TileGroup> indexes = new Dictionary<int, TileGroup>();

    foreach (TileGroup group in this.ultraLiveTileView1.Groups)

    {

        indexes[group.Index] = group;

    }

    Please let me know if this is what you are looking for or if I am missing something.

    Thank you for using Infragistics Components.

Reply Children