您的位置:首页 > 其它

到目前为止给DataGrid添加Number列最简单方法

2007-05-05 10:36 162 查看
suppose DataGrid named dgCustomize, insert the following code to the first column.


<asp:TemplateColumn HeaderText="No.">


<ItemStyle HorizontalAlign="Center"></ItemStyle>


<ItemTemplate>


<asp:Label runat="server" Text='<%# dgCustomize.CurrentPageIndex*dgCustomize.PageSize+dgCustomize.Items.Count+1 %>'>


</asp:Label>


</ItemTemplate>


</asp:TemplateColumn>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: