AspxGridView添加序号列

时间:2014-06-25 16:58:49   收藏:0   阅读:426
       
using System.Globalization;//CultureInfo需要

 protected void AspxGridView_stock_HtmlDataCellPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableDataCellEventArgs e)
        {
            if (e.DataColumn.Caption.Trim() == "序号")
            {
                e.Cell.Text = ((e.VisibleIndex) + 1).ToString(CultureInfo.InvariantCulture);
            }
        }


需要在列表中绑定有名为‘序号’的列

AspxGridView添加序号列,布布扣,bubuko.com

原文:http://www.cnblogs.com/zwc-blog/p/3806130.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!