If you've tried to use the AutoCompleteExtender inside a ModalPopupExtender, you'll notice that the autocomplete options show behind the modal popup. This is a Z-index problem in which the ModalPopupExtender overrides all other controls. If you check the modal's Z-index you'll see that it uses 100001 for its foreground element, so use something higher like 10000001.
<cc1:AutoCompleteExtender ID="ace" runat="server" OnClientShown="ShowOptions">
</cc1:AutoCompleteExtender>
<script language="javascript" type="text/javascript">
function ShowOptions(control, args) {
control._completionListElement.style.zIndex = 10000001;
}
</script>
So we use the OnClientShown property which will call a javascript function to change the AutoCompleteExtender's Z-index when it kicks in.
Thursday, March 4, 2010
AutoCompleteExtender problems with ModalPopupExtender
Subscribe to:
Post Comments (Atom)
Thanks a lot, Really searched on net for a long and finally found this working. Thanks again buddy.
ReplyDeleteWow, thanks do much for this... great code!
ReplyDeleteLouis
So much thanks.
ReplyDeleteIt works! Thanks a lot!
ReplyDeleteExcellent! Thanks!
ReplyDeleteI was just hungry for this solution. Tanks a lot.
ReplyDeleteThanksssss!
ReplyDeleteAWESOME!!!!!!!!!! thanx soooooo much! help me alot
ReplyDeleteThank you!!!
ReplyDeleteMaster!! Gracias!
ReplyDeleteBuenisimo.... thank you so much.... Muy buena ayuda. thanks for your help.
ReplyDeleteAwesome, had me going nuts for ages, your solution saved me loads of time, thanks
ReplyDeletethank you so much sir
ReplyDeleteTHAAAAAAAAAAAAAANK YOUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
ReplyDeleteThankssssssssssssssssssssss budddddyyyyyyyy
ReplyDeleteMe sirvio mucho tu ayuda Gracias
ReplyDeletethanks for your help
really worked.. thanks..
ReplyDeleteThanks
ReplyDelete