2012-11-20 2 views
0

asp.net에서 고정 헤더가있는 스크롤로 중계기를 넣어야합니다. 별도의 CSS 또는 와트를 사용해야합니다. 아니면 div.or에서 자동으로 중계기를 고쳐야합니다.이 부분을 설명하는 링크를 제공합니까 ????중계기가 스크롤 옵션이있는 고정 헤더가 있습니다

repeator이

<div style="overflow: auto; height: 200px;"> 
<asp:Repeater ID="id_repSearch" runat="server"> 
              <HeaderTemplate> 
               <table style="border: 1px solid #465c71;" cellpadding="5" width="100%"> 
                <tr style="background-color: #465c71; color: White" align="center"> 
                 <td width="20%" align="center"> 
                  Firstname 
                 </td> 
                 <td width="20%" align="center"> 
                  Lastname 
                 </td> 
                 <td width="40%" align="center"> 
                  Emailid 
                 </td> 
                 <td width="35%" align="center"> 
                  Mobileno 
                 </td> 
                </tr> 
               </table> 
              </HeaderTemplate> 
</div> 

내가 헤더 별도로 어떤 CSS 클래스를 작성해야

DIV 태그에 저를 도와 repeator에만 열을 표시

답변

0

당신은 수직 또는 수평을 달성하기 위해 asp.net 패널 컨트롤을 사용할 수 있습니다 스크롤링.

헤더 템플릿을 제거하고 위 패널에서 헤더 행을 만듭니다.

<table> 
<tr> 
<td> 
<table style="border: 1px solid #465c71;"  cellpadding="5" width="100%"> 
               <tr style="background-color: #465c71; color: White" align="center"> 
                <td width="20%" align="center"> 
                 Firstname 
                </td> 
                <td width="20%" align="center"> 
                 Lastname 
                </td> 
                <td width="40%" align="center"> 
                 Emailid 
                </td> 
                <td width="35%" align="center"> 
                 Mobileno 
                </td> 
               </tr> 
              </table> 
<asp:Panel runat="server" Id="scrollPanel" Height="200px;" Scrollbar="Vertical"> 
<asp:Repeater ID="id_repSearch" runat="server"> 
<itemteplate> 
<table style="border: 1px solid #465c71;"  cellpadding="5" width="100%"> 
               <tr style="background-color: #465c71; color: White" align="center"> 
put your repeating controls here 
</tr> 
</table> 
/itemtemplate> 
</asp:Panel> 
</td> 
</tr> 
</table> 
관련 문제