Fadoyo,
Alternatively you could use the "In" operator, instead of the OR operator.
Something like (variation of Dmitriy's sample):
Dim filter As New StringBuilder ("Identifier In (")
Dim needDelim As Boolean = false
Dim rowView As DataRowView
For Each rowView in dataView1
If needDelim Then
filter.Append(","c)
End If
filter.Append(rowView("IdentifierColumn"))
needDelim = True
Next
filter.Append(")"c)
dataView2.RowFilter = filter.ToString()
I tend to prefer the "In" operator over a list of "Or" operators, as IMHO
the In operator is "easier" to follow. Otherwise they both do the same
thing!
Hope this helps
Jay
"Fadoyo" <fa****@hotmail.com> wrote in message
news:eL**************@TK2MSFTNGP10.phx.gbl...
Hi, thank you,
Fadoyo
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:ub**************@tk2msftngp13.phx.gbl... Hi,
It would probably be something like this if I got you right:
Dim filter As New StringBuilder
Dim rowView As DataRowView
ForEach rowView in dataView1
If filter.Length > 0 Then
filter.Append(" OR ")
End If
filter.AppendFormat("Identifier={0}",
rowView("IdentifierColumn").ToString())
Next
dataView2.RowFilter = filter.ToString()
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Fadoyo" <fa****@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl... Hi all, please, I would like to ask something:
I do have a dataview(dv1) with several Identifiers, then I want to
creat a new dataview(dv2) which row filter is any Identifier contained into
the other dataview ( dv1).
Thank you very much
Fadoyo Orithsuma.