Does Property return a reference to the classes object?

N

nate axtell

I have a custom class with a Private DataTable member and a Public Property
that returns this DataTable in its Get call. Is the DataTable that is
returned from the Property's Get a reference to the class's Datatable?
I'm binding a DataGrid in my form as follows, but adding a row with the
bo.AddRow() method does not update what is in the DataGrid. Any
suggestions?

[Start Form]
Private bo as CustomBusinessClass
FormLoad()
bo = New CustomBusinessClass()
bo.initListing() '-- initializes datatable
FormGrid.SetBindings(bo.Listing, "")
End FormLoad()

ButtonClick()
bo.AddRow()
End ButtonClick
[End Form]

Public Class CustomBusinessClass
Private _listing as DataTable
Public ReadOnly Property Listing() as DataTable
Get
Return _listing
End Get
End Property

initListing()
...Fill the listing by creating a DataTable manually
end initListing

AddRow()
...Add row to _listing manually
end AddRow
End Class
 
N

nate axtell

Disregard...
My problem is with resetting the DataTable in the Business Object, not in
the use of the Property to access the DataTable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top