3
update serializedvalue set value.modify('
insert
<GridDataVisibleColumn>
<FilterBehavior>StronglyTyped</FilterBehavior>
<FilterBarMode>Immediate</FilterBarMode>
<AllowFilter>false</AllowFilter>
<AllowSort>true</AllowSort>
<AllowDrag>true</AllowDrag>
<AllowGroup>true</AllowGroup>
<AllowResize>true</AllowResize>
<ShowColumnOptions>false</ShowColumnOptions>
<HeaderText>DeskLabel</HeaderText>
<IncrementSeed>1</IncrementSeed>
<IsIdentity>false</IsIdentity>
<IsReadOnly>true</IsReadOnly>
<MappingName>Deskl</MappingName>
<MinimumWidth>0</MinimumWidth>
<Width>
<UnitType>Auto</UnitType>
<Value>1</Value>
</Width>
<DataType>String</DataType>
<UpdateMode>LostFocus</UpdateMode>
<IsHidden>false</IsHidden>
</GridDataVisibleColumn>
as last into (/GridDataTableProperties/VisibleColumns)[1]
')
where Token like '%gridsettings%'
當我使用此查詢將節點添加到現有的列。每次運行它都會添加一列。XML DML(Xpath)查詢禁止重複列。它應該測試插入之前是否存在列
我想要實現的是它應該檢查某個特定節點是否存在映射名稱,以及是否存在不添加此節點。否則添加它。那我下面
Link是http://msdn.microsoft.com/en-us/library/ms175466
謝謝。它效果很好 – StackOverflowVeryHelpful