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%'
When i use this query to add a node to an existing column. Every time it is ran it adds a column.
What i want to achieve is that it should check if a particular node exist with a mapping name and if it exists that dont add this node. else add it.
Link that i am following is http://msdn.microsoft.com/en-us/library/ms175466