2
공유 목록보기를 프로그래밍 방식으로 갠트 차트보기로 만들 수 있습니까? 프로그래밍 방식으로 목록보기를 만들었습니다. 아래 코드를 참조하십시오.Gant 차트보기로 공유 목록보기를 프로그래밍 방식으로 만들 수 있습니까?
var web = (SPWeb)properties.Feature.Parent;
SPList list = web.GetList(SharedDocumentListUrl);
SPViewCollection allviews = list.Views;
string viewName = "Document Review Summary";
System.Collections.Specialized.StringCollection viewFields = new System.Collections.Specialized.StringCollection();
viewFields.Add(EYWorkProductIndicator);
viewFields.Add(EYPaperProfile);
viewFields.Add(DocIcon);
string myquery = "<Where><Eq><FieldRef Name='Status' /><Value Type='Choice'>In Review</Value></Eq></Where>"
+ "<OrderBy><FieldRef Name='LinkFilename' Ascending='True' /></OrderBy>";
SPView customView = allviews.Add(viewName, viewFields, myquery, 100, true, false);
customView.XslLink = "eymain.xsl";
customView.Update();