2
こんにちは私はlinqを使ってコードビハインドからxmlの情報をgridviewに入力しています。私はxml( "値要素")内の私の要素の1つに従って私のグリッドを注文したいが、これを行う方法を理解することはできません。何か案は?LINQ:匿名で注文するタイプ
gvResourceEditor.DataSource = (From resElem In resourceElements.Elements("data") _
Select New With { _
.Key = resElem.Attribute("name").Value, _
.Value = HttpUtility.HtmlEncode(resElem.Element("value").Value), _
.Comment = If(resElem.Element("comment") IsNot Nothing, HttpUtility.HtmlEncode(resElem.Element("comment").Value), String.Empty) _
}).OrderBy(?????)
パーフェクト!ありがとうございました :) – Arno