vishal_trivedi - Friday, January 14, 2011 8:17 AM:
Hi,
I have given TOC Access to Activity2.
Activity2 contains activities from Project Template and Project.
I want to restrict activities from Project Template to be loaded in Grid of Activity2.
I need help.
Please it's too urgent.
I will be thankful to you all if it can be resolved.
- Vishal
SamsAn - Monday, January 17, 2011 4:34 PM:
Hello.
You can assign "OnBeforeGet" server event for Activity2 ItemType. The event C# method code should be like below.
string page = this.getAttribute("page");
if (!string.IsNullOrEmpty(page)) //the page attribute is a marker of TOC Items Grid request
{
string projectTemplatesActivitiesIDs =... //it's not trivial to fetch ALL project template activities ids, however possible even with the good performance.
this.setProperty("id", projectTemplatesActivitiesIDs); //Now setup the filter to avoid project template activities
this.setPropertyAttribute("id", "condition", "not in");
}
Samsan
vishal_trivedi - Tuesday, January 18, 2011 1:10 AM:
Hi Samsan,
It is really working well..
Thank you so much.. This was the really big issue for me.
Your solution is perfect.
Cheers,
Vishal