zoukankan
html css js c++ java
hashtable 绑定的datagrid
cs code
protected
System.Web.UI.WebControls.DataList datalist;
Hashtable o
=
new
Hashtable();
private
void
Page_Load(
object
sender, System.EventArgs e)
{
DataTable dt
=
new
DataTable();
dt.Columns.Add(
"
saf
"
);
DataRow dr
=
dt.NewRow();
dr[
0
]
=
"
todd ha ha
"
;
dt.Rows.Add(dr);
dr
=
dt.NewRow();
dr[
0
]
=
"
summy ha ha
"
;
dt.Rows.Add(dr);
o.Add(
1
,dt);
o.Add(
2
,dt);
o.Add(
3
,dt);
this
.datalist.DataSource
=
o;
this
.datalist.DataBind();
}
private
void
datalist_ItemDataBound(
object
sender, System.Web.UI.WebControls.DataListItemEventArgs e)
{
DataGrid obj
=
((DataGrid)(e.Item.FindControl(
"
datagridtest
"
)));
//
object objItem = this.datalist.DataKeys[e.Item.ItemIndex];
System.Collections.DictionaryEntry Entity
=
(System.Collections.DictionaryEntry)(e.Item.DataItem);
DataTable bb
=
((DataTable)(Entity.Value));
obj.DataSource
=
bb;
obj.DataBind();
}
aspx code
<
asp:DataList
ID
="datalist"
Runat
="server"
DataKeyField
="key"
>
<
ItemTemplate
>
<
asp:Label
ID
="labeltest"
Runat
=server
text
='<%#
DataBinder.Eval(Container, "DataItem.key")%
>
' >
</
asp:Label
>
<
asp:DataGrid
ID
="datagridtest"
Runat
=server
></
asp:DataGrid
>
</
ItemTemplate
>
</
asp:DataList
>
查看全文
相关阅读:
roundabout插件使用(3d旋转轮播图)兼容IE8
css实现定高的元素在不定高的容器中水平垂直居中(兼容IE8及以上)
jq点击小图 弹出大图(更新版)
pc端页面在移动端显示问题
swiper横向轮播--3d
swiper横向轮播(兼容IE8)
windows 7安装apache
从SDP中至少要看到那些东西?
FS拓展设置
Freeswitch 入门
原文地址:https://www.cnblogs.com/snowball/p/461406.html
最新文章
UVA 10397 Connect the Campus
UVA 10048 Audiophobia
UVA 10034 Freckles
UVA 567 Risk
UVALIVE 3571 Visible Lattice Points
UVALIVE 2955 Vivian's Problem
github上face_recognition工程项目实践
深度学习案例教程【2018年12月更新】
Ubuntu18.04使用AndroidStudio3.2.1编译TensorFlow android demo【2018年12月】
使用Python批量修改文件名
热门文章
Ubuntu 使用 Android Studio 编译 TensorFlow android demo
基于TensorFlow Object Detection API进行相关开发的步骤
使用TensorFlow遇到的若干问题
Ubuntu18.04+GTX1080Ti+CUDA9.0+cuDNN7.0+TensorFlow-GPU1.9环境搭建
TensorFlow从入门到理解(六):可视化梯度下降
TensorFlow从入门到理解(五):你的第一个循环神经网络RNN(回归例子)
移动端 html基值(转载)
js call、apply和bind
js获取7天之前或之后的日期
js控制 input框中输入数字时,累计求和
Copyright © 2011-2022 走看看