Jim
|
| Posted: 07/21/2004, 6:12 AM |
|
Hi,
Here's my situation, was wondering if anyone can offer some thoughts.
I have an editable grid for table A, where one input is a drop down listbox. The listbox pulls elements (id = value) from Table B, and builds the select options normally. The user selects a value from the list, and the associated id is inserted / updated to the database.
Pretty standard stuff.
Now, the problem. The client has several issues with this page.
1. The number of values in table B is large (over 1,000), which can make the page long to load.
2. It takes too long to find the value desired, from the long list.
Now, my question. Is there an easy way to convert the drop down to a textbox, then validate and map the entered data to the associated id in table B after the form is submitted?
I tried a couple of approaches, but everything seems to be a bit cumbersome and prone to bugs. I'm trying hard not to hack this thing into an ugly mess.
Any ideas are appreciated.
-Jim
|
|
|
 |
E43509
Posts: 283
|
| Posted: 07/21/2004, 8:51 AM |
|
I had the same problem and YES has a solution http://examples.codecharge.com/
Look up
Data Input Techniques
Pop-up List & Smart Lookup
Pop-up grid/list for selecting values and Smart Lookup for quick data entry.
|
 |
 |
Jim
|
| Posted: 07/21/2004, 11:57 AM |
|
This is close to what I need -
I am getting stuck on the OnValidate area for the grid. There are multiple rows to be examined.
here's my code for the control event (on the kit_id):
sub accounts_services_kit_id_OnValidate()
{
$accounts_services_kit_id_OnValidate = 1;
#End accounts_services_kit_id_OnValidate
#Custom Code @98-84ABEA10
# -------------------------
# Write your own code here.
$DBConnection1_new = clsDBConnection1->new();
$kit_id = CCDlookUp("kit_id", "kits", "mas_id = '".$accounts_services->{mas_id}->GetValue()."'", $DBConnection1_new);
if(!$kit_id) {
$accounts_services->{Errors}->addError("The kit: ".$accounts_services->{mas_id}->GetValue()." is not a valid kit number.")
}
else {
$accounts_services->{kit_id}->SetValue($kit_id);
}
Now, it seems that the $kit_id is getting set just fine, but the line:
$accounts_services->{kit_id}->SetValue($kit_id);
doesn't seem to be doing the trick, because after the update is done, the kit_id is the same.
Any help?
-Jim
|
|
|
 |
|