Implement Parent/Child Cascading?

May 9, 2013 at 10:48 PM
How would you suggest I implement a "Parent/Child Cascading" situatoin on a page? I am using ASP.Net and I hacehave the flexbox code working. I have two flexbox controls on the page, each is populated with data. When the user selects an option from one of the drop downs, I need to filter the choices in the other dropdown (and probably unselect if there was something selected and return the control to the "watermark"). I have tried just adding another call to the flexbox function from the OnSelect even handler for the parent, but that adds another control to the page. Is there any way to dynamically remove (not hide, but remove) the child? (I could then call the flexbox function and let it add it...) Or, what other solution would you suggest?

This is a great control. Thanks!
May 14, 2013 at 2:47 PM
I solved this and fixed a "bug".

I solved the parent/child issue by removing the Div in the OnClick() handler just before adding the new one back (with the filtered data).

I also implemented "keep results", which shows the full list when the arrow is clicked, even after a selection has been made. I used the information from this article: (I added the code posted by "Yoannr" AND "jimiscott".)

The "bug" I ran in to is if you make a selection, keep the mouse on the drop down arrow and then click again, the delay for hiding the results is too long (200 milliseconds) and ends up firing after your mouse click, so the results get hidden. This "bug" is easily reproducible and happens (with or without the changes I mentioned above). There is an easy fix though. In the blur() handler for the input element, change the setTimeout(hideResults()) call from 200 milliseconds to 100 milliseconds. That seems to work perfectly.