M
moondaddy
I'm wanting to create a bindable list object made up of a list of business
classes. I'm writing this in a vb.net 1.1 winforms app and am using a code
example by Rocky Lhotka for reference material:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/vbnet02252003.asp
which makes use of the IEditableObject interface.
My situation is that my business class manages data for a table which has
about 20 columns all of which are represented in the business class. In the
test samples I created from Rockies example, every property in the business
class became part of the bindable list so when I bound a my custom list
object to the datagrid, all 20+ columns showed in the datagrid. However, I
only want to use about 4 columns for the datagrid. I was wondering if there
was an elegant way to make a class that would be used as the ListItem class
and it would be an abstract of the business class and have only the columns
I wanted to use in the datagrid. Furthermore, I want to edit data from this
datagrid, so this ListItem class would need to utilize the New, Save,
Canceled, Delete, etc. methods from the business class with out having to
re-write a lot of extra code.
Can anyone recommend some good ways to approach this? and even better,
recommend some code examples or documentation?
Thanks.
classes. I'm writing this in a vb.net 1.1 winforms app and am using a code
example by Rocky Lhotka for reference material:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/vbnet02252003.asp
which makes use of the IEditableObject interface.
My situation is that my business class manages data for a table which has
about 20 columns all of which are represented in the business class. In the
test samples I created from Rockies example, every property in the business
class became part of the bindable list so when I bound a my custom list
object to the datagrid, all 20+ columns showed in the datagrid. However, I
only want to use about 4 columns for the datagrid. I was wondering if there
was an elegant way to make a class that would be used as the ListItem class
and it would be an abstract of the business class and have only the columns
I wanted to use in the datagrid. Furthermore, I want to edit data from this
datagrid, so this ListItem class would need to utilize the New, Save,
Canceled, Delete, etc. methods from the business class with out having to
re-write a lot of extra code.
Can anyone recommend some good ways to approach this? and even better,
recommend some code examples or documentation?
Thanks.