Hi all,For this thread this is the code i figured out working well.Thanks again qazi.
Public Sub SelectCustomer_Changed(
ByVal sender As Object, ByVal e As XmlEventArgs)
Try
' Get a reference to the Customers secondary data source,
' and create an XPathNavigator object for it.
Dim Customers As XPathNavigator = _
Me.DataSources("Customers").CreateNavigator
' Create an XPathNavigator object positioned on the current site,
' which is the SelectCustomer node in the main data source.
Dim myForm As XPathNavigator = e.Site.CreateNavigator
' Move to the parent of the SelectCustomer node, so that the code
' can access the CustomerName node.
myForm.MoveToParent()
' Check if the user selected the blank value from the
' Drop-Down List Box after previously selecting a CustomerID.
If e.Site.InnerXml = "" Then
' Clear previously selected value from CustomerName field.
myForm.SelectSingleNode("my:CustomerName", _
Me.NamespaceManager).DeleteSelf()
Else
' Get the Company name from the Customers data source using
' the value in the CustomerID node.
Dim custName As String = Customers.SelectSingleNode( _
"/Customers/Customer[CustomerID = '" & e.Site.InnerXml & _
"']/CompanyName", Me.NamespaceManager).InnerXml
' Select the CustomerName node for the current row
' and set its value.
myForm.SelectSingleNode("my:CustomerName", _
Me.NamespaceManager).SetValue(custName)
End If
Catch ex As Exception
MessageBox.Show("Error: " & ex.Message)
End Try
End Sub