ASP.NET中DataGrid加序号(转自NinetyNine的个人财富)

ASP.NET中DateGrid加序号
创建一个模板列
再添加以下代码
<asp:TemplateColumn HeaderText="序号">
                                            
<HeaderStyle Width="120px"></HeaderStyle>
                                            
<ItemTemplate>
                                                
<%#Container.ItemIndex+1%>
                                            
</ItemTemplate>
                                        
</asp:TemplateColumn>
转自 NinetyNine的个人财富  http://www.cnblogs.com/ninetynine/archive/2007/08/07/846527.html
posted @ 2007-08-17 23:40  小龟爬爬  阅读(296)  评论(0编辑  收藏  举报