posts - 5,  comments - 5,  trackbacks - 0

          ViewFields是SPViewFieldCollection, 只能拿到interal name,要獲取中文的字段名,可以事先做一個internalName到title的轉換:

          using System.collection;

          SPSite site = new SPSite("url");

          SPWeb web = site.OpenWeb();

          SPList list = web.Lists[listname];

          SPView listview = onelist.Views[view];

          Hashtable internalToTitle = new Hashtable();

          foreach(SPField field in list.Fields)
          {
          internalToTitle.Add(field.InternalName, field.Title);
          }

          輸出的時候轉換一下:
          for(int j=0;j<listview.ViewFields)
          {
          output.write(internalToTitle[view.ViewFields[j]].ToString());
          }

          posted on 2006-10-30 10:32 曾科 閱讀(349) 評論(1)  編輯  收藏 所屬分類: SharePoint Portal Server

          FeedBack:
          # re: 如何獲取WSS列表視圖的中文字段
          2008-01-23 18:17 | foxhorse
          謝謝!  回復  更多評論
            

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2025年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          常用鏈接

          留言簿(3)

          隨筆檔案

          文章分類

          文章檔案

          相冊

          .net

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 宿松县| 洪雅县| 广东省| 玛纳斯县| 万山特区| 泽库县| 平陆县| 济阳县| 昌宁县| 平凉市| 株洲市| 洪湖市| 石屏县| 桂平市| 贵港市| 广丰县| 利辛县| 辽阳县| 黔西| 九寨沟县| 西和县| 崇左市| 兴城市| 格尔木市| 观塘区| 凤山县| 深泽县| 綦江县| 灌阳县| 乌拉特中旗| 垣曲县| 余江县| 凯里市| 塘沽区| 柘城县| 得荣县| 都匀市| 曲麻莱县| 恭城| 崇礼县| 新平|