asp.net ModalPopupExtender : need to show scroll bar when overflow

后端 未结 2 1387
情书的邮戳
情书的邮戳 2020-12-17 03:42

I display a gridview in a ModalPopupExtender. When the screen resolution is to small, the pop-up is to big to all be displayed on the page.

I just want to add scroll

2条回答
  •  無奈伤痛
    2020-12-17 04:03

    I just found this.

    ModalPopupExtender does not show scroll bar

    it was still not working, but it was because I use a masterpage, so I solved this using the ClientID.

    (note: to center that inner asp:panel vertically, the only thing I found was to put it into a Table cell using style="vertical-align:middle". I also need set OptionSelectionTable's height using JavaScript because height="100%" fail with some browser.)

     
    

    I also had to add the HorizontalAlign="Center" and ScrollBars="Auto" and to the Panel ID="OptionSelectionPanel" (the modalpopup's PopupControlID).

    I moved the CssClass="modalTextBox" to an inner asp:panel and restored the HorizontalAlign="Left".

     
                
                
                    
                
                
                    
    ......

提交回复
热议问题