reorderList使用
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
<form id="form1" runat="server">
<ajaxToolkit:ToolkitScriptManager ID="asm" runat="server">
</ajaxToolkit:ToolkitScriptManager>
<div>
<asp:UpdatePanel ID="up1" runat="server">
<ContentTemplate>
<ajaxToolkit:ReorderList
ID="rl1"
runat="server"
SortOrderField="position"
AllowReorder="true"
DataSourceID="sds"
DataKeyField="id" onitemreorder="rl1_ItemReorder" >
<DragHandleTemplate>
<div class="DragHandleClass">
</div>
</DragHandleTemplate>
<ItemTemplate>
<asp:Label ID="ItemLabel" runat="server" Text='<%#Eval("description") %>' />
</ItemTemplate>
<ReorderTemplate>
<asp:Panel ID="Panel2" runat="server" CssClass="reorderCue" />
</ReorderTemplate>
</ajaxToolkit:ReorderList>
<asp:SqlDataSource
ID="sds"
runat="server"
ConnectionString="Data Source=.;Initial Catalog=MyRoleTest;Integrated Security=True"
ProviderName="System.Data.SqlClient"
OldValuesParameterFormatString="original_{0}"
SelectCommand="SELECT [id], [char], [description], [position] FROM [AJAX] ORDER BY [position]"
UpdateCommand="UPDATE [AJAX] SET position=@position WHERE [id]=@original_id">
<UpdateParameters>
<asp:Parameter Name="position" Type="Int32" />
<asp:Parameter Name="original_id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</ContentTemplate>
</asp:UpdatePanel>
<%--
<div class="demoarea">
<div class="demoheading">ReorderList Demonstration</div>
<i>To Do:</i>
<asp:UpdatePanel ID="up1" runat="server">
<ContentTemplate>
<div class="reorderListDemo">
<ajaxToolkit:ReorderList ID="ReorderList1" runat="server"
PostBackOnReorder="false"
DataSourceID="ObjectDataSource1"
CallbackCssStyle="callbackStyle"
DragHandleAlignment="Left"
ItemInsertLocation="Beginning"
DataKeyField="ItemID"
SortOrderField="Priority">
<ItemTemplate>
<div class="itemArea">
<asp:Label ID="Label1" runat="server"
Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("Title"))) %>' />
<asp:Label ID="Label2" runat="server"
Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("Description", " - {0}"))) %>' />
</div>
</ItemTemplate>
<EditItemTemplate>
<div class="itemArea">
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Title") %>' ValidationGroup="edit" />
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Description") %>' ValidationGroup="edit" />
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Priority") %>' ValidationGroup="edit" />
</div>
</EditItemTemplate>
<ReorderTemplate>
<asp:Panel ID="Panel2" runat="server" CssClass="reorderCue" />
</ReorderTemplate>
<DragHandleTemplate>
<div class="dragHandle"></div>
</DragHandleTemplate>
<InsertItemTemplate>
<!-- bottom border is workaround for IE7 Beta issue where bg doesn't render -->
<div style="padding-left:25px; border-bottom:thin solid transparent;">
<asp:Panel ID="panel1" runat="server" DefaultButton="Button1">
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Title") %>' ValidationGroup="add" />
<asp:Button ID="Button1" runat="server" CommandName="Insert" Text="Add" ValidationGroup="add" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ValidationGroup="add"
ErrorMessage="Please enter some text" ControlToValidate="TextBox1" />
</asp:Panel>
</div>
</InsertItemTemplate>
</ajaxToolkit:ReorderList>
</div>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="Select"
TypeName="SessionTodoXmlDataObject" UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="Original_ItemID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Priority" Type="Int32" />
<asp:Parameter Name="Original_ItemID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Priority" Type="Int32" />
</InsertParameters>
</asp:ObjectDataSource>
</ContentTemplate>
</asp:UpdatePanel>
</div>
--%>
</div>
</form>
reorderList使用的更多相关文章
- Leetcode ReorderList
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do thi ...
- ReorderList 的使用
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> ...
- leetcode — reorder-list
/** * Source : https://oj.leetcode.com/problems/reorder-list/ * * Given a singly linked list L: L0→L ...
- reorder-list 单链表
题意: 给你一个单链表 a1 a2 a3 a4 a5....an 让你变成 a1 an a2 an-1 a3 an-2 .... 这里牵涉到,单链表的倒置和两个单链表的合并. class Soluti ...
- reorder-list——链表、快慢指针、逆转链表、链表合并
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do thi ...
- reorder-list leetcode C++
Given a singly linked list L: L 0→L 1→-→L n-1→L n, reorder it to: L 0→L n →L 1→L n-1→L 2→L n-2→- You ...
- [LeetCode] Reorder List 链表重排序
Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do th ...
- leetcode算法分类
利用堆栈:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/http://oj.leetcode.com/problem ...
- BUG-FREE-For Dream
一直直到bug-free.不能错任何一点. 思路不清晰:刷两天. 做错了,刷一天. 直到bug-free.高亮,标红. 185,OA(YAMAXUN)--- (1) findFirstDuplicat ...
随机推荐
- ASP.NET MVC 4 RC的JS/CSS打包压缩功能 Scripts.Render和Styles.Render
打包(Bundling)及压缩(Minification)指的是将多个js文件或css文件打包成单一文件并压缩的做法,如此可减少浏览器需下载多个文件案才能完成网页显示的延迟感,同时通过移除JS/CSS ...
- ios批量打包
最近我们接到了新的需求,需要打出类似xx001-xx100共100个这样的ipa渠道包,不需要签名.(这批ipa包后续会用企业证书签名,不会影响AppStore的) 这些包所有的功能.内容都是一样的, ...
- Java: IO 字节流
FileReader是InputStreamReader的子类,InputStreamReader是Reader的子类.Reader系列是输入字符流. 1.一个字符一个字符的读取 import jav ...
- iOS开发UI篇—九宫格坐标计算
iOS开发UI篇—九宫格坐标计算 一.要求 完成下面的布局 二.分析 寻找左边的规律,每一个uiview的x坐标和y坐标. 三.实现思路 (1)明确每一块用得是什么view (2)明确每个view之间 ...
- iOS开发Swift篇—(四)运算符
iOS开发Swift篇—(四)运算符 一.运算符 1.Swift所支持的部分运算符有以下一些 赋值运算符:= 复合赋值运算符:+=.-= 算术运算符:+.-.*./ 求余运算符:% 自增.自减运算符: ...
- PHP 面向对象编程
面向对象——类: 创建一个类: //创建了一个没有内容的Person(人)类 class Person{ } //通过new关键字来 实例化一个类 $teacher = new Person; //t ...
- Android 源码下载
一直想尝试android源码的编译,这两天正好海思代码的编译也需要ubuntu环境,于是安装了ubuntu 12.04,安装时选了语言为中文,因此下面很多状态及错误报告都是中文了,另外分配了4G sw ...
- C语言程序设计第一次作业
同学们,我们已经留了两次实验了,请大家将这两次的实验课内容写成实验报告在截止日期前进行提交. 截止日期:2016-10-7 23:00 实验一: 编程打印5行的倒三角形,第一行打印9个*,第二行7个* ...
- 委托Delegate,多播委托和委托链
定义一个委托 public delegate void CalculateDelegate(int 32 x,int 32 y); 定义一个委托类型的变量 public static Calculat ...
- VS2010 刷新工具箱(刷新自定义控件)
有时候自己自定义了控件,定义完后却不见工具箱中刷新出来自定义的控件,解决方案有了三种: 点评:在项目中增加了几个自定义控件,想在窗口上添加时却发现工具箱根本就没有些控件,晕了.记得2008都可以自动出 ...