素材巴巴 > 程序开发 >

固定表头的DataGrid

程序开发 2023-09-07 18:21:45

前后折腾快一个星期了,不知道还有什么问题没了。

主要属性:

IsAutoWidth  获取设置是否自动调整宽度,如果设置为true则忽略width的设置

IsAutoHeight   获取设置是否自动调整高度,如果设置为true则忽略height的设置

使用方法:


                     < MSw:ScrollingGrid ID = " dg1 "  runat = server Width = 120 %  isAutoWidth = " true "  isAutoHeight = " true "  IsShowHeaderWidthLacuna = " true "  BackColor = WhiteSmoke Height = " 600px "  AdjustHeight = " 45 " >
                         < asp:DataGrid runat = server ID = " Datagrid1 "  CellPadding = 5  CellSpacing = 1  AllowSorting = True AllowPaging = True PageSize = 100  OnPageIndexChanged = PageIndexChanged DataSource =<% # ds  %>  DataMember = orders >
                             < HeaderStyle BackColor = #4488bb ForeColor = white Font - Bold = True  />
                             < ItemStyle BackColor = #fefefe  />
                             < AlternatingItemStyle BackColor = #dddddd  />
                             < PagerStyle ForeColor = Gray Mode = NumericPages  />
                        
                    

效果图如下:

 参考:http://www.codeproject.com/aspnet/ScrollingGrid.asp

下载地址: http://download.csdn.net/source/249161


标签:

上一篇: taro1/2及taro3实现原理 下一篇:
素材巴巴 Copyright © 2013-2021 http://www.sucaibaba.com/. Some Rights Reserved. 备案号:备案中。