标签:io ar os 使用 sp on bs as res
添加一个新的非绑定列,使用CustomColumnDisplayText事件来分配序号给该列
<dx:GridViewDataTextColumn Caption="序号" UnboundType="String" VisibleIndex="0"></dx:GridViewDataTextColumn>
protected void ASPxGridView1_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e)
{
if (e.Column.Caption == "序号")
{
e.DisplayText = (e.VisibleRowIndex + 1).ToString();
}
}
标签:io ar os 使用 sp on bs as res
原文地址:http://www.cnblogs.com/devercai/p/4080809.html