Microsoft is still making fun us. Is the only conclusion I could have it today. Thanks to this post, I discovered I can still use SPD 2010 for new generation of SharePoint. Why I need it? The answer is simple, I my team I will have a new colleague without experience on coding XSLT. SharePoint Designer 2010 is a good option for this. And I just uninstall all updates and it worked. Hello Microsoft! Do you want leave some people without a job. Consider first some people are earning some money doing SharePoint customization.
Recently, it cross my mind the idea of displaying groups for current user in a DVDropDownList. There are solutions which are using SharePoint web services, but I found something easier. Again, membership CAML clause help me.
Following code is an example of an SPDataSource showing information I need.
<SharePoint:SPDataSource runat="server" DataSourceMode="List" ID="GroupsDataSource" SelectCommand="<View><Query><Where><Membership Type="CurrentUserGroups"><FieldRef Name="ID"/></Membership></Where></Query></View>" UseInternalName="True"> <SelectParameters><asp:Parameter Name="ListName" DefaultValue="User Information List" /> </SelectParameters> </SharePoint:SPDataSource>
To be more clear, I placed below decoded CAML:
<View><Query><Where><Membership Type="CurrentUserGroups"><FieldRef Name="ID"/></Membership></Where></Query></View>
The rest is simple. Create a DVDropDownList and bind to this source.
<SharePoint:DVDropDownList runat="server" DataSourceID="GroupsDataSource" DataTextField="Title" DataValueField="Title" />