<SelectedItemTemplate>
Item:
<asp:Label id=ItemLabel runat="server" Text='<%# DataBinder.Eval(Container.DataItem , "Item") %>'>
</asp:Label><BR>
Quantity:
<asp:Label id=QtyLabel runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Qty") %>'>
</asp:Label><BR> </SelectedItemTemplate>
想问一下, DataBinder.Eval(Container.DataItem, "Qty") 这句在这里是什么意思?以及这个函数的具体用法是干什么的那?请各位高手帮我讲的详细点。小弟先谢谢了
Item:
<asp:Label id=ItemLabel runat="server" Text='<%# DataBinder.Eval(Container.DataItem , "Item") %>'>
</asp:Label><BR>
Quantity:
<asp:Label id=QtyLabel runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Qty") %>'>
</asp:Label><BR> </SelectedItemTemplate>
想问一下, DataBinder.Eval(Container.DataItem, "Qty") 这句在这里是什么意思?以及这个函数的具体用法是干什么的那?请各位高手帮我讲的详细点。小弟先谢谢了
解决方案 »
- 我的vs2010为什么写着写着会自动退出
- C# 2维定义问题
- c# 图片压缩 (非图片大小变化)----使得显示效果差点,但是图片占用空间需要变小。
- 请推荐北京net好的培 训 机 构,谢谢!
- Collection<EmployeeRecord > employees = new Collection<EmployeeRecord>();这句代码为什么要有个单书名号呢?
- 关于console输出的一个小问题
- sqlserver触发器中:该操作未能执行,因为 OLE DB 提供程序 'MSDASQL' 无法启动分布式事务,如何解决?
- COM+分布式事务处理无法访问远程数据库服务器
- 请各位老师帮我看看关于C#的问题
- C#实际经纬度转换成屏幕坐标
- NetAdvantage Head 如何换行?
- asp.net连sql server提示 sql server不存在或访问被拒绝。
含义就是在你的 lable 的 text上显示QTY的值
void Item_Bound(Object sender, DataGridItemEventArgs e)
{
if((e.Item.ItemType == ListItemType.Item) ||
(e.Item.ItemType == ListItemType.AlternatingItem))
{
// Retrieve the text of the CurrencyColumn from the DataGridItem
// and convert the value to a Double.
Double Price = Convert.ToDouble(e.Item.Cells[2].Text); // Format the value as currency and redisplay it in the DataGrid.
e.Item.Cells[2].Text = Price.ToString("c");
}
}
请问这里的:e.Item.ItemType == ListItemType.Item这句是什么意思呀?我对这里的item有点不懂?请各位高手指教一下好吗?
e.Item.ItemType == ListItemType.Item 表示找到类型一样的控件