Scott MacMaster
January 24th, 2008, 05:03 PM
I'm working on a page that will be used for configuring users. Of course all the controls will be dynamic since the list of users will be dynamic.
I have a expand button next to each user which when clicked shows options for the users.
Within the options sections, which is a table, I have a "user type" drop down. I have the drop down do an autopost back. In the post back I update another drop down with a list of "subtypes" for the selected "user type".
The problem I have is with the "user type" drop down. It can't seem to remember the selected index and I can't get it to link with the SelectedIndexChanged event handler. I've spent hours reading blogs and other things. Tried everything I can think of. The most common thing I read had to do with making sure I add the dynamic controls before setting a properties.
That seems unlikely since none of my controls are added before I set their properties and they are work fine except my drop down.
In the Init() function I query the database for the list of users and settings. Then I create all the controls I could need and put them in a custom data structure. Basically I a sorted_list of User objects.
In Load() I create the table by looping through my user list and adding the controls I need. Most are not added since only one user can be expended at a time.
I really don't see why the DropDownList would not work when everything else does. Maybe there's a setting I missed or something else. Does anyone have any ideas?
Thanks,
Scott MacMaster
I have a expand button next to each user which when clicked shows options for the users.
Within the options sections, which is a table, I have a "user type" drop down. I have the drop down do an autopost back. In the post back I update another drop down with a list of "subtypes" for the selected "user type".
The problem I have is with the "user type" drop down. It can't seem to remember the selected index and I can't get it to link with the SelectedIndexChanged event handler. I've spent hours reading blogs and other things. Tried everything I can think of. The most common thing I read had to do with making sure I add the dynamic controls before setting a properties.
That seems unlikely since none of my controls are added before I set their properties and they are work fine except my drop down.
In the Init() function I query the database for the list of users and settings. Then I create all the controls I could need and put them in a custom data structure. Basically I a sorted_list of User objects.
In Load() I create the table by looping through my user list and adding the controls I need. Most are not added since only one user can be expended at a time.
I really don't see why the DropDownList would not work when everything else does. Maybe there's a setting I missed or something else. Does anyone have any ideas?
Thanks,
Scott MacMaster