首页 > 编程语言 > 详细

ASPxGridView的自动排序(写在onCustomUnboundColumnData()事件中)

时间:2015-12-27 15:55:45      阅读:469      评论:0      收藏:0      [点我收藏+]

//此排序写于后台,可打印出序号 

protected void ASPxGridView_progoods_CustomUnboundColumnData(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDataEventArgs e)

        {

            if (e.Column.FieldName == "NO" && e.IsGetData)

                e.Value = (e.ListSourceRowIndex + 1).ToString();

          

        }

 

//此排序只girivew中,不能打印出来

<Columns>
<dx:GridViewDataTextColumn Caption="序号" VisibleIndex="0" Width="1%">
<EditFormSettings Visible="False" />
<CellStyle HorizontalAlign="Center"></CellStyle>
<DataItemTemplate>
<dx:ASPxLabel ID="L_rowid_1" runat="server" Text=‘<%# Container.ItemIndex + 1 %>‘>
</dx:ASPxLabel>
</DataItemTemplate>
</dx:GridViewDataTextColumn>

</Columns>

ASPxGridView的自动排序(写在onCustomUnboundColumnData()事件中)

原文:http://www.cnblogs.com/dfxyw/p/5080097.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!