2009-07-24 5 views
0

사이트 모음의 모든 항목 즉 각 웹 사이트의 문서 라이브러리를 나열하는 웹 파트를 만들려고합니다. 다음 코드를 사용하고 있습니다.크로스 사이트 데이터 wss 3.0 sharepoint

 SPWeb web = SPContext.Current.Web; 
     SPSiteDataQuery query = new SPSiteDataQuery(); 

     //Ask for all lists created from the document library template. 
     query.Lists = "<Lists ServerTemplate=\"101\" />"; 

     // Get the Name field. 
     query.ViewFields = "<FieldRef Name=\"Title\" />";        

     // Set the sort order. 
     query.Query = "<OrderBy>" + 
          "<FieldRef Name=\"Created\" Ascending=\"False\" />" + 
         "</OrderBy>"; 

     // Query all Web sites in this site collection. 
     query.Webs = "<Webs Scope=\"SiteCollection\" />"; 

     DataTable dt = web.GetSiteData(query); 
     DataView dv = new DataView(dt); 

내 사이트 모음에는 다른 문서 라이브러리가있는 작업 영역과 중첩 된 하위 사이트가 들어 있습니다. 웹 파트는 완벽하게 렌더링되지만 ViewFields에 지정되어 있으므로 열 제목 만 표시합니다.

편집 메뉴가있는 문서에 링크 된 열 이름을 표시하여 각 항목을 하이퍼 링크로 표시 할 수 있으며이 링크를 클릭하면 각 응용 프로그램에 항목이 열립니다. Microsoft Word 2007에서.

도와주세요.

답변

관련 문제