GridView、ListView、Repeater使用方法
来源:互联网 发布:手机淘宝怎么申请帐号 编辑:程序博客网 时间:2024/05/22 04:26
GridView ...
<asp:GridView ID="grdList" runat="server" AutoGenerateColumns="False" OnRowUpdating="grdList_RowUpdating"
OnRowCancelingEdit="grdList_RowCancelingEdit" OnRowEditing="grdList_RowEditing">
<Columns>
<asp:BoundField DataField="绑定字段名称" HeaderText="标题1" />
<asp:TemplateField HeaderText="标题2">
<ItemTemplate>
<asp:Label runat="server" Text='<%#Eval("绑定字段")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="标题2(可编辑列)">
<ItemTemplate>
<asp:Label runat="server" Text='<%#Eval("绑定字段")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<input type="text" runat="server" value='<%#Eval("绑定字段")%>'/>
</EditItemTemplate>
</asp:TemplateField>
<asp:CommandField ShowEditButton="True" />
</Columns>
</asp:GridView> ListView ...
<asp:ListView ID="lsvList" runat="server" OnItemCommand="lsvList_ItemCommand">
<LayoutTemplate>
<table>
<tr>
<th>序 号</th>
<th>标 题</th>
<th>操 作</th>
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td><%#Container.DataItemIndex+1%></td>
<td><%#Eval("绑定字段")%></td>
<td>
<span onclick="windows.open(url地址);">修改</span>
<asp:LinkButton ID="btnDel" runat="server" CommandName="DEL" CommandArgument='<%#Eval("ID")%>'
CausesValidation="false" OnClientClick="return confirm('确认删除?');" >删除</asp:LinkButton>
</td>
</tr>
</ItemTemplate>
</asp:ListView> Repeater ...
<table >
<asp:Repeater ID="rptList" runat="server" onitemcommand="rptList_ItemCommand">
<HeaderTemplate>
<tr align="center">
<th>标题1</th>
<th>标题2</th>
<th>操 作</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#Eval("绑定字段1")%></td>
<td><%#Eval("绑定字段2")%></td>
<td>
<span class="textbtn_xg" onclick="windows.open(url地址);">修改</span>
<asp:LinkButton ID="btnDel" runat="server" CommandName="DEL" CommandArgument='<%#Eval("id")%>'
OnClientClick="return confirm('确认删除?');">删除</asp:LinkButton>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
- GridView、ListView、Repeater使用方法
- gridview , listview , repeater自动行号
- GridView、DataGrid、DataList、Repeater、ListView、DetailsView、FormView 的区别
- ado.net、DataList、DetailsView、FormView、GridView、ListView、Repeater直观印象
- GridView 、DataList 、Repeater 比较
- Gridview repeater datelist 区别
- GridView,repeater整理
- GridView、Repeater合并单元格
- 用JS取GRIDVIEW,LISTVIEW,Repeater,行中控件的值
- asp.net中GridView、DataGrid、DataList、Repeater、ListView、DetailsView、FormView 的区别
- 使用js获取和改变gridview,listview,repeater行中控件的值
- ASP.NET REPEATER, LISTVIEW, DATALIST, DATAGRID, GRIDVIEW - WHICH ONE TO CHOOSE?
- repeater的使用方法详解
- Repeater的使用方法详解
- Repeater与ListView
- GridView使用方法
- GridView使用方法GridView
- GridView, ListView
- java NIO
- linux+oracle 11g 的启动
- Platform_device和platform_driver
- 数据库设计中的14个技巧
- CString型数据转换成BYTE型数据
- GridView、ListView、Repeater使用方法
- 数据库设计范式深入浅出
- WebForm 中 选中树事件
- 博客开张
- 数据库设计三大范式应用实例剖析 ALL
- Linux环境变量
- NHibernate 3.0.0.Alpha1版本
- 20100728
- Attribute "scope" must be declared for element type "bean"