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%'
当我使用此查询将节点添加到现有列时。每次运行它都会添加一列。
我想要实现的是它应该检查是否存在具有映射名称的特定节点以及是否存在不添加该节点。否则添加它。