zoukankan
html css js c++ java
DataGrid Item autogenerate serial number
when
AllowPaging
=False
<
asp:DataGrid id
=
"
DataGrid1
"
runat
=
"
server
"
>
<
Columns
>
<
asp:TemplateColumn
>
<
ItemTemplate
>
<%
# Container.ItemIndex
+
1
%>
</
ItemTemplate
>
</
asp:TemplateColumn
>
</
Columns
>
</
asp:DataGrid
>
or
<
asp:DataGrid id
=
"
DataGrid1
"
runat
=
"
server
"
>
<
Columns
>
<
asp:TemplateColumn
>
<
ItemTemplate
>
<%
#
this
.DataGrid1.Items.Count
+
1
%>
</
ItemTemplate
>
</
asp:TemplateColumn
>
</
Columns
>
</
asp:DataGrid
>
AllowPaging
="True"
<
asp:DataGrid id
=
"
DataGrid1
"
runat
=
"
server
"
AllowPaging
=
"
True
"
>
<
Columns
>
<
asp:TemplateColumn
>
<
ItemTemplate
>
<%
#
this
.DataGrid1.CurrentPageIndex
*
this
.DataGrid1.PageSize
+
Container.ItemIndex
+
1
%>
</
ItemTemplate
>
</
asp:TemplateColumn
>
</
Columns
>
</
asp:DataGrid
>
Reverse order:
//have been defined:
private int RowsCount
=
ds.Tables
[0].
Rows.Count
asp:DataGrid id
=
"
DataGrid1
"
runat
=
"
server
"
AllowPaging
=
"
True
"
>
<
Columns
>
<
asp:TemplateColumn
>
<
ItemTemplate
>
<%
# RowsCount
-
DataGrid1.CurrentPageIndex
*
DataGrid1.PageSize
-
Container.ItemIndex
%>
</
ItemTemplate
>
</
asp:TemplateColumn
>
</
Columns
>
</
asp:DataGrid
>
查看全文
相关阅读:
Intel 编译器 线程安全检查 真心的很详细 转
当前软件设计分析
当代并行机系统
多人游戏服务器
ACE源代码目录结构
(转!)Z buffer和W buffer简介
数据库-视图(View)详解
推荐一个vs自带工具分析代码的复杂度
SCOPE_IDENTITY的用法
vs2013开发调试cocos2d-x-Lua工程项目
原文地址:https://www.cnblogs.com/archmaster/p/87168.html
最新文章
C++Qt5+win10+MSVC2015 64bit构建程序,Release编译成功后使用windeployqt.exe发布程序使用于win7出现缺少MSVCP140.dll!!!
误删代码,靠回忆写完代码!!!!
《C++ Primer Plus(第6版)》14章 C++代码复用
c++学习 -- #program once
c++编译错误C2971:"std::array":array_size:包含非静态存储不能用作废类型参数;参见“std::array”的声明
Qt5+MSVC2015编译器编译发布的Release程序运行崩溃,如何查找崩溃的原因??
Qt5+MSVC2015环境将VS2015编写的控制台程序转化为GUI程序
QT-- MainWindow外的cpp文件调用ui
VS2017Release+x64失败,LNK1104,无法打开文件"msvcprt.lib"
Qt5和VS2017建立开发环境,安装后新建项目找不到Qt选项!!!
热门文章
linux 3.10 串口注册
寝室生活吐槽
《屌丝日记》系列-开篇
Oracle 12c 的windows 安装
Oracl 安装经常遇到的问题总结
Intel 发现并行的问题
Intel 并行性分析
Intel 寻找热点
Intel 编译器 内存安全检查 真心的很详细 转
Intel 编译器 静态安全检查 真心的很详细 转
Copyright © 2011-2022 走看看