<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使用的更多相关文章

  1. 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 ...

  2. ReorderList 的使用

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">       ...

  3. leetcode — reorder-list

    /** * Source : https://oj.leetcode.com/problems/reorder-list/ * * Given a singly linked list L: L0→L ...

  4. reorder-list 单链表

    题意: 给你一个单链表 a1 a2 a3 a4 a5....an 让你变成 a1 an a2 an-1 a3 an-2 .... 这里牵涉到,单链表的倒置和两个单链表的合并. class Soluti ...

  5. 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 ...

  6. 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 ...

  7. [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 ...

  8. leetcode算法分类

    利用堆栈:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/http://oj.leetcode.com/problem ...

  9. BUG-FREE-For Dream

    一直直到bug-free.不能错任何一点. 思路不清晰:刷两天. 做错了,刷一天. 直到bug-free.高亮,标红. 185,OA(YAMAXUN)--- (1) findFirstDuplicat ...

随机推荐

  1. Stack的pop和push操作

    #include <stack> #include <cstdio> using namespace std; int main(){ stack<int> s; ...

  2. git删除远程仓库的某次错误提交

    改日写git的各种本地恢复 今天不小心把一个分支合并到master上了,上网查了一下回复的方法,简单来说就是: 在本地 把远程的master分支删除再把reset后的分支内容给push上去 新建old ...

  3. string.Format格式化

    ,)//填充,结果为02,003

  4. PLSQL开发笔记和小结(转载)

    *****************************************   PLSQL基本结构 ***************************************** 基本数据 ...

  5. centos55_oracle11gr2_install

    第一个阶段:安装centos55 a:安装centos5.5   用图形界面安装  硬盘 16G 注意:用图形界面安装.. 第二个阶段:配置1:检查内存情况# grep MemTotal /proc/ ...

  6. ionic本质

    ionic本质一开发工具,ionic项目目录里在大堆东西,一堆插件(plugins),还有一堆npm包(node_modules),其实都是骗人的-( ̄▽ ̄-)~ 什么nodejs,npm只是为了解决 ...

  7. Rhel6-piranha配置文档

    系统环境: rhel6 x86_64 iptables and selinux disabled 主机: 192.168.122.119 server19.example.com 192.168.12 ...

  8. 国际性公司的中国化BPM业务流程管理怎么落地?

    康奈可集团于1938年在日本成立,总部位于东京,日本康奈可自2002年开始投资中国,现已在江苏无锡.湖北襄樊和广州地区投资设立8家公司,总投资超过1亿美元.公司主要生产汽车模块及散热器.车用空调.消音 ...

  9. Array 、 Dictionary 、 Object 3大数据结构 以及 for ... in for each的研究

    Array:存储方式-------索引存储 (要求key是大于等于0的整数) Dictionary.Object:存储方式---------索引存储 区别:可以说它们的 key 都 对应 各自的引用, ...

  10. jquery Mobile弹出窗

    先创建一个窗体 <div data-role="popup" id="popupView" class="ui-content" da ...