Is it possible to copy Business objects to pure dotnet table?


Author
Message
Raymond Lo
Raymond Lo
StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)
Group: Forum Members
Posts: 18, Visits: 101

Dear All,

       I need to implement the Infragistics ultragrid to my application. So I need to bind the datasource to donet table or dataset. So my question is: Can I copy the business object to dotnet standalone table (copy the structure and the data) ? like as businessobject.CopyFrom function.

Thanks.

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You will want to just use the BusinessBindingSource to bind to a grid. It implements the IBindingList interface which a grid needs in order to bind. You can get more information on this in the documentation. But in short, just drop the BBS on the form where your BO instance resides, select the BBS and set the BusinessObject property to the instance you wish to wrap. At this point you will be able to bind to the grid.
Paul Chase
Paul Chase
Advanced StrataFrame User (580 reputation)Advanced StrataFrame User (580 reputation)Advanced StrataFrame User (580 reputation)Advanced StrataFrame User (580 reputation)Advanced StrataFrame User (580 reputation)Advanced StrataFrame User (580 reputation)Advanced StrataFrame User (580 reputation)Advanced StrataFrame User (580 reputation)Advanced StrataFrame User (580 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Trent is right that the business binding source is what ya want to bind a BO to a grid.

However there may be times or reasons etc to where you will need to load data from a bo to a data table or dataset.

Datatable.Load(BusinessObject.CurrentView.ToTable.CreateDataReader)

Dataset.Tables(BusinessObject.TableName).Load(BusinessObject.CurrentView.ToTable.CreateDataReader)


Raymond Lo
Raymond Lo
StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)
Group: Forum Members
Posts: 18, Visits: 101
Hi Trent & Paul ,

Thank you very much.

 Paul's coding is what I need.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search