prdeshpande
asked on
Filter custom list from all sharepoint lists
In my scenario I am trying to get all the lists and display in checkbox list control(please see screenshot)
foreach (SharePointclientObj.List list in site.Lists)
{
System.Web.UI.WebControls. ListItem item = new System.Web.UI.WebControls. ListItem(l ist.Title, list.DefaultViewUrl);
checkBoxListName.Items.Add (item);
}
As this is working fine but its showing all the lists which are inbuit in sharepoint. I wanted to fetch only the custom list which are created by users in the sharepoint site.
How do I filter custome list from all the lists?
Screenshot.png
foreach (SharePointclientObj.List list in site.Lists)
{
System.Web.UI.WebControls.
checkBoxListName.Items.Add
}
As this is working fine but its showing all the lists which are inbuit in sharepoint. I wanted to fetch only the custom list which are created by users in the sharepoint site.
How do I filter custome list from all the lists?
Screenshot.png
ASKER
Hey thx for reply,Can you please elaborate on your statements or I appreciate if you can share me some code snippets
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Gr8 Solution
My solution was to gather the GUIDs of the out of the box lists (they are created by features and therefore are always the same), and I used that list of GUIDs to exclude those lists so that only my custom lists were shown.
I'm not aware of an easier solution than that.