Cross site data wss 3.0 sharepoint -
I am trying to create a web part that will list all the items from the site collection i.e. From every web site's document library. I am using the following code.
SPWeb web = SPContext.Current.Web; SPSiteDataQuery query = new SPSiteDataQuery (); // Ask for all the lists created from the Document Library template. Query.Lists = "& lt; Lists ServerTemplate = \" 101 \ "/ & gt;"; // Find the field named Query.ViewFields = "FieldRef name = \" title \ "/>; // Set sort order Query.query = "& lt; OrderBy>" + "FieldRef name = \" created \ "ascending = \" false \ "/> + "& Lt; / OrderBy>"; // Query.Webs = "website scope = \" SiteCollection \ "/>"; "; query all websites in this site collection. Datatable DT = web.GetSiteData (query); Datavive DV = New DataView (DT);
My site collection contains nested sub-sites and workspace with different document libraries are web part completely rendered but this only shows the column title because it is specified in Viewfield is done.
Is it possible to show the column name (linked from the document from the Edit menu), so that each item appears as a hyperlink and on this link click, this item will open in the related application eg
Try to use this. There is an example.
Comments
Post a Comment