The simpler solution would be to create a webpart, within the visual webpart add a SPGridView. With that you can then do a checkup on the items.
iv already shown how to create a gridview within a visual webpart here:
How to display list on application (aspx) page by visual studio?
you would also need to add this code to calll the gridview binding event to check up against each item:
dont know if it would work but it needs fine tuning! i could be wrong and it would work right away as i havent tested it.... the cell id is the column index number of the field that holds the ID's , were seeing if the current user is in the text field of cell 4 (column number 5 as we start from cell 0 - 4). if the id is within the cell than show the row else hide.
<SharePoint:SPGridView ID=”oGrid” runat=”server” AutoGenerateColumns=”true” >
public class VisualWebPart1 : WebPart
// Visual Studio might automatically update this path when you change the Visual Web Part project item.
private const string _ascxPath = @"~/_CONTROLTEMPLATES/VisualWebPartProject9/VisualWebPart1/VisualWebPart1UserControl.ascx";
private SPUser currentUser;
protected override void CreateChildControls()
Control control = Page.LoadControl(_ascxPath);
using (SPSite site = new SPSite(SPContext.Current.Site.Url))
using (SPWeb web = site.OpenWeb("yourSubSiteName"))
SPList list = web.Lists["list name"];
SPListItemCollection items = list.Items;
SPGridView oGrid = new SPGridView();
oGrid.DataSource = items.GetDataTable();
oGrid.RowDataBound += new GridViewRowEventHandler(oGrid_RowDataBound);
currentUser = new SPUser();
currentUser = web.CurrentUser;
private void oGrid_RowDataBound(object sender, GridViewRowEventArgs e)
e.Row.Visible = true;
e.Row.Visible = false;
as we are using SPGridView it will make the webpart look exactly like the sharepoint document library.