Adding / Removing Groups at Run Time |
Post Reply |
Author | |
dexatron
Newbie Joined: 27 January 2010 Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 01 February 2010 at 7:25pm |
Hi,
I am adding new group with items based on what item is clicked in my top group.
I am trying to remove this dynamic group before adding the new group if a different item is clicked on.
My problem is that I can seem to remove the existing group. I can't seem to identify it:
'this code fails
If tp1.Groups.Find(2) Then
tp1.Groups.Remove (tp1.Groups(2)) End If ' this is the add code on item click that works fine
Set group = tp1.Groups.Add(2, "My Calendar")
group.Items.Add 1, "Weigh In", xtpTaskItemTypeLink, 0 thanks for any help
|
|
dexatron
Newbie Joined: 27 January 2010 Status: Offline Points: 9 |
Post Options
Thanks(0)
|
There has to be a better way, but this is how I have it working at the moment:
If Item.Group.Id = 1 Then
If tp1.Groups.Count > 2 Then ' remove the dynamic group if it exists tp1.Groups.Remove (tp1.Groups.Count) End If Select Case (Item.Index - 1)
Case 0 Set Group = tp1.Groups.Add(2, "My Calendar") Group.Items.Add 1, "Weigh In", xtpTaskItemTypeLink, 0 Case 1....
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |