在ASPX文件ASPxGridView控件的合适处添加如下代码:
<dxwgv:GridViewDataTextColumn Caption="序号" VisibleIndex="0" Width="25px">
<DataItemTemplate>
<%# Container.ItemIndex+1%>
</DataItemTemplate>
<EditFormSettings Visible="False" />
</dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn Caption="序号" VisibleIndex="0" Width="25px">
<DataItemTemplate>
<%# Container.ItemIndex+1%>
</DataItemTemplate>
<EditFormSettings Visible="False" />
</dxwgv:GridViewDataTextColumn>