Problem with Dropdown List on webform if bound BO has no records


Author
Message
Andrew Harper
Andrew Harper
StrataFrame User (280 reputation)StrataFrame User (280 reputation)StrataFrame User (280 reputation)StrataFrame User (280 reputation)StrataFrame User (280 reputation)StrataFrame User (280 reputation)StrataFrame User (280 reputation)StrataFrame User (280 reputation)StrataFrame User (280 reputation)
Group: StrataFrame Users
Posts: 87, Visits: 3.3K
Hi,

I have a webform  for maintaining users that contains 2 dropdown lists for selection: lstCustomers and lstUsers, and a third dropdown list lstUserType  populated from boUserType which displays the type of the selected user.

lstCustomers is populated from BO boCustomers and lstUsers is populated with users for the selected customer from lstCustomers using BO  boUsers.

In the selection changed event for lstCustomers I repopulate boUsers and refresh the display of lstUsers.

All is working fine except for when I select a customer that has no users. In this case I get an error

lstUserType' has a SelectedValue which is invalid because it does not exist in the list of items.

Any suggestions on how to get around this most greatfully received,

TIA

Andy

 
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I'm thinking that the user type combo has a value that is appropriate for the situation where this is no customer, but you haven't handled that case, likely in populating the user type combo. I haven't done this in a while, but I think the TopMostItem on the user type combo to match the value when there is no customer. That's where I'd start.
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