开发者

grid view control in asp.net

I have one grid view control in my asp.net web application. For example i have data grid as 10 rows and 8 columns in fixed size. I want When the data comes to grid view more than 10 rows means the scroll bar will appear to display and not the size of the data grid exceed. How can I do . I use the following source

                <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" 
                    HorizontalAlign="Center" VerticalAlign="Middle" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#2461BF" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>

If anyone can help to me its really appr开发者_运维技巧eciated. Thank you


try this,

<div style = "overflow : scroll;">
     <asp:GridView>Your GridView</asp:GridView>
</div>

hope it helped.


Put your grid in a fixed size div element, when the content size exceeds the length of the div it will generate a scroll bar. If you want to control the scroll bar, use the css attribute "overflow".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜