Data Binding in .NET with CSLA BOs

OK, I am having quite an issue with data bindings in .NET. Some background information, my business object tier is using CSLA v1.0. And _clientObj is passed in as a parameter as a business object that inherits CSLA.BusinessBase

Here is the code segment:

Dim nextClient As New ComboBox With { _
            .Name = "txtClientAtt" & (ClientBoxes.Count + 1).ToString(), _
            .DisplayMember = "FullNameAndID", .ValueMember = "ClientID", _
            .Tag = _clientObj}
nextClient.DataSource = ClientList.GetClientList(SelectedSite)

nextClient.DataBindings.Add("SelectedValue", _clientObj, "ClientID")
If Not _clientObj.ClientID = Nothing AndAlso nextClient.SelectedValue Is Nothing Then
     Debug.Print("How could I ever be inside this conditional????")
End If

That debug statement does indeed get reached if _clientObj is a pre-existing object with an assigned ID value. How is that possible? I was assuming that adding the data binding should immediately set the .SelectedValue property of the ComboBox if the DataSource object has an initial value.


If Not _clientObj.ClientID = Nothing

is not the correct way to test for a null value. You should be using:

If Not _clientObj.ClientID Is Nothing

However, I'm not sure if that is actually the issue you are having or not.

Need Your Help

How to load two extended JPanel class to one JFrame?

java image swing jpanel paint

I'm going to make a game with Java, my game will have a menu. the menu is having a background, and 2 JLabel objects. I've make them on separate class, which is passed to one JFrame. And my problem...

How to choose the rows where ColumnX=1 but ≠2?


The task I have to complete is:choose the Titre which for which NumCritere equals 1 but does not equal to 2.