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 曾科 閱讀(346) 評論(1)  編輯  收藏 所屬分類: SharePoint Portal Server

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

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


          網(wǎng)站導航:
           
          <2008年1月>
          303112345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          常用鏈接

          留言簿(3)

          隨筆檔案

          文章分類

          文章檔案

          相冊

          .net

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 靖宇县| 将乐县| 应用必备| 原阳县| 金乡县| 庆云县| 调兵山市| 于都县| 柳州市| 南郑县| 临洮县| 博客| 高淳县| 禹城市| 石狮市| 阳信县| 集贤县| 阿克陶县| 开封县| 郧西县| 涟水县| 红河县| 庆元县| 江阴市| 巩留县| 三门峡市| 阿拉善右旗| 淮南市| 革吉县| 丹阳市| 锦屏县| 逊克县| 桂林市| 安宁市| 行唐县| 亳州市| 宁陵县| 沐川县| 马关县| 德格县| 治多县|