This is a strange case while working with ADO .net in windows
application. If some one can explain me what is going on here or what
i am doing wrong. the story is as below.
I have a Class CData
In this is returm a table view. using a property.
Public ReadOnly Property getPrompt() As DataView
Get
Return Me.tblPrompt.DefaultView
End Get
End Property
I use this in another class Report
I create a seperate instance of dataview and assign it to that object.
Dim PromptDV As New DataView
PromptDV = frmMDI.maintCom.CData.getArrivalsPrompt
Problem 1: If the function in which it contains this abouve piece of
code and is called again though some other place, we still get the old
filtered value.
That is lets print the rowFilter for the PromptDV it will print a
filter criteria. Please see that we have not applied filter to the
Dataview yet
PromptDV.RowFilter = "TYPECODE = 'Cold' "
At this point
frmMDI.maintCom.CData.getArrivalsPrompt.rowfilter will also show the
same value. If we set frmMDI.maintCom.CData.getArrivalsPrompt = "",
then PromptDV.RowFilter also get reset to "".
I am not able to understand this behaviour. Any help of clarification
is highly appreciated.
Regards
-Joyjeet
Leer las respuestas