SharePoint で作成したカスタム リストを使用しています。機能がアクティブ化されたときに開始されるイベント ハンドラーを持つ機能があります。そのイベント ハンドラーは、次の関数を呼び出します (デバッグして実行を監視できます)。
ここで説明されているように関数が動作することを意図しています。
private void OrderFields(SPWeb web)
{
// This works fine: I get the expected SPContentType object
// There is only 1 SPContentType in ContentTypes
SPContentType contentType = web.Lists[TASK_LIST_NAME].ContentTypes[0];
contentType.FieldLinks.Reorder(new string[4]
{
"Field1",
"Field2",
"Field3",
"Field4"
});
contentType.Update();
}
呼び出す関数も呼び出しOrderFields
ますweb.Update();
。
残念ながら、reorder 呼び出しでフォームのフィールドが並べ替えられません。何か不足していますか?誰かが私が試すかもしれないトリックを提案できますか?