固定表头的DataGrid

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

主要属性:

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  />
                        
asp:DataGrid >
                    
MSw:ScrollingGrid >

效果图如下:

固定表头的DataGrid_第1张图片

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

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

你可能感兴趣的:(.NET)