Databinding and large number of records

Posts   
 
    
Krish
User
Posts: 91
Joined: 02-Jan-2008
# Posted on: 01-Apr-2008 11:48:23   

Scenario is as follows : I bind llblgen pro datasource to a details view control. Lets say it displays an address details. When I edit this address, one of the fields I have to deal with is the postcode (zipcode in some countries) field. The post code itself comes from a separate post code reference table and has about 10000 records. The post code field for editing is a templated field - using a drop down list and uses a separate LLBLGen Pro datasource to get the post code data. But as you can imagine, 10000+ records is a big problem. Also the post code reference table has a couple of columns other than the post code column and so the post code entity collection also has a few fields. Multiply this by 10000+, you get the picture.

In summary, when you have a drop down list bound to a datasource, and this drop down list can potentially have thousands of records how do you deal with it. Can you do some sort of paging?

I have tried using AJAX to populate the drop down on client side depending on some selection the user makes, but then the value selected by the user in the drop down list is not picked up by LLBLGen Pro datasource for updating.

I am using APS.NET 3.5, LLBLGen Pro 2.5 final version with Oracle 10g database. Self-servicing two class templates are used to generate the code.

goose avatar
goose
User
Posts: 392
Joined: 06-Aug-2007
# Posted on: 01-Apr-2008 21:21:21   

In summary, when you have a drop down list bound to a datasource, and this drop down list can potentially have thousands of records how do you deal with it. Can you do some sort of paging?

I don't see how paging could be userful in a drop down list.

Data bounding is normally a big pain because is very hard when you try to achieve flexible behaviors, when it comes to it I normally tend to take practical choices. In your case I'll try to use another method other than a drop down list bounded to a column first of all because it would be very uncomfortable for the user to select the value (too much data). In the case of a postal code I'll let the user enter it directly to a textbox and then I'll validate the value when the form is submitted. In other kinds of values I'll create a selection form so the user can select the value in there and then come back to the main form.

I have tried using AJAX to populate the drop down on client side depending on some selection the user makes, but then the value selected by the user in the drop down list is not picked up by LLBLGen Pro datasource for updating.

This should work, please paste your code, or upload a small repro solution using northwind so we can help you better.

Krish
User
Posts: 91
Joined: 02-Jan-2008
# Posted on: 09-Apr-2008 23:25:18   

I have tried using AJAX to populate the drop down on client side depending on some selection the user makes, but then the value selected by the user in the drop down list is not picked up by LLBLGen Pro datasource for updating. This should work, please paste your code, or upload a small repro solution using northwind so we can help you better.

It does work. Thank you.