I have 5 RadComboBoxes (RCB) that are set to AutoPostBack and are all tied to individual ObjectDataSources. I have subroutines for each SelectedIndexChanged that will bind the next RCB to it's ObjectDataSource. I also have subroutines for each DataBound that will a) automatically select option #2 if there are only 2 options, and b) call the SelectedIndexChanged for the RCB so the next RCB can be bound to its data.
The process goes like this: the first RCB is bound and the other 4 are disabled. When the user select from the first RCB, it's posted back and the second RCB is filled. The user then selects from the second RCB and after postback the third RCB is filled. The user then selects from the third RCB and now the fourth RCB is filled. Hoever, at this point the code looks and notices that there are only 2 options, so it selects the 2nd and calls the SelectedIndexChanged (as if the user clicked it) and fills the 5th RCB.
What I get in the end is twice as much data in the 5th RCB as expected. For example, if the ObjectDataSource really returns 1 result, I see 2 options in the 5th RCB. And if it returns 2 results, I see 4 options in the RCB.
I can place breakpoints on the DataBound and SelectedIndexChanged and I notice that the DataBound subroutine gets hit twice...the second time for no apparent reason.
I added some debugging code in RCB5.ItemCreated and found that if the ObjectDataSource returned 3 items, this subroutine would only be hit twice. Likewise if it returned 2 times, this subroutine would only be hit once.
Can anyone shed some light on this? If I need to clarify anything please let me know.
Thanks!
The process goes like this: the first RCB is bound and the other 4 are disabled. When the user select from the first RCB, it's posted back and the second RCB is filled. The user then selects from the second RCB and after postback the third RCB is filled. The user then selects from the third RCB and now the fourth RCB is filled. Hoever, at this point the code looks and notices that there are only 2 options, so it selects the 2nd and calls the SelectedIndexChanged (as if the user clicked it) and fills the 5th RCB.
What I get in the end is twice as much data in the 5th RCB as expected. For example, if the ObjectDataSource really returns 1 result, I see 2 options in the 5th RCB. And if it returns 2 results, I see 4 options in the RCB.
I can place breakpoints on the DataBound and SelectedIndexChanged and I notice that the DataBound subroutine gets hit twice...the second time for no apparent reason.
I added some debugging code in RCB5.ItemCreated and found that if the ObjectDataSource returned 3 items, this subroutine would only be hit twice. Likewise if it returned 2 times, this subroutine would only be hit once.
Can anyone shed some light on this? If I need to clarify anything please let me know.
Thanks!