Manually Create TypedList

Posts   
 
    
rparkins
User
Posts: 66
Joined: 04-May-2005
# Posted on: 02-May-2006 17:45:56   

I am currently storing images in the database and have an ImageEntity and typed list for images.

My client has switched providers and they charge against the size of the database. This has kind of pre-empted my decision to store images on the filesystem, so I am creating a new business layer that goes to the file system insetad of through to the database.

To stop myself having to re-generate all my datagrids and repeater controls I was wondering if there is a way of manually creating a TypedList with DataRows as currently I cannot manually create an ImageRow and add these to the Row collection of the ImageTypedList.

I am using the Self servicing 2 class model, and if you could help or have any other possible ways around this I would be grateful

Many thanks

Richard

Rogelio
User
Posts: 221
Joined: 29-Mar-2005
# Posted on: 02-May-2006 18:12:02   

rparkins wrote:

To stop myself having to re-generate all my datagrids and repeater controls I was wondering if there is a way of manually creating a TypedList with DataRows as currently I cannot manually create an ImageRow and add these to the Row collection of the ImageTypedList.

Richard

Richard,

Actually you can create a ImageRow and add these to row collection of the typedlist. I am doing that actually.

To enable you to add a row to the row collection of the typedlist: - Open your typedlist and go to the InitClass method and add the following:



            Dim col As DataColumn

            For Each col In Me.Columns
                col.ReadOnly = False
            Next


inside the ' __LLBLGENPRO_USER_CODE_REGION_START InitClass

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 02-May-2006 18:13:01   

I'm not sure what are you trying to do, but if you can create a DataTable taht will solve your issue, then you can bind to it instead of a TypedList.

You may also want to look at DynamicLists at "Using the generated code -> Adapter/SelfServicing -> Using dynamic lists" in the LLBLGen Pro manual.