繁体中文
设为首页
加入收藏
当前位置:ASP技术首页 >> ASP基础 >> MSDN DataGrid嵌套DataList (saucer(思归)版)

MSDN DataGrid嵌套DataList (saucer(思归)版)

2005-12-15 08:00:00  作者:  来源:互联网  浏览次数:0  文字大小:【】【】【
简介:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsdatalistclassedititemtemplatetopic.asp // The Cart and CartView objects temporarily stor...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsdatalistclassedititemtemplatetopic.asp

<%@ Page Language="C#" AutoEventWireup="True" %>

<%@ Import Namespace="System.Data" %>

DataList Edit Example

Click Edit to edit the values of the item.



<%#Container.ItemIndex+1%>

GridLines="Both"

RepeatColumns="3"

RepeatDirection="Horizontal"

CellPadding="3"

CellSpacing="0"

OnEditCommand="Edit_Command"

OnUpdateCommand="Update_Command"

OnDeleteCommand="Delete_Command"

OnCancelCommand="Cancel_Command"

runat="server">

Items

Item:

<%# DataBinder.Eval(Container.DataItem, "Item") %>


Quantity:

<%# DataBinder.Eval(Container.DataItem, "Qty") %>


Price:

<%# DataBinder.Eval(Container.DataItem, "Price", "{0:c}") %>


Text="Edit"

CommandName="Edit"

runat="server"/>

Item:

Text='<%# DataBinder.Eval(Container.DataItem, "Item") %>'

runat="server"/>


Quantity:

Text='<%# DataBinder.Eval(Container.DataItem, "Qty") %>'

runat="server"/>


Price:

Text='<%# DataBinder.Eval(Container.DataItem, "Price", "{0:c}") %>'

runat="server"/>


Text="Update"

CommandName="Update"

runat="server"/>

Text="Delete"

CommandName="Delete"

runat="server"/>

Text="Cancel"

CommandName="Cancel"

runat="server"/>

责任编辑:admin
相关文章