拖曳带有中继器控制项模板 [英] drag & drop with repeater control item template

查看:67
本文介绍了拖曳带有中继器控制项模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在页面加载时,我想拖放要重新排列项目的行

设计是这个

Hi All,

On page load i want to drag and drop the row which i want for rearranging the items

desgin is this

<%@ Page Title="" Language="C#" MasterPageFile="~/Store/Admin.Master" AutoEventWireup="true"

      CodeBehind="ArrangeProgramItems.aspx.cs" Inherits="MyImageFirst.Store.stores.manager.ArrangeProgramItems" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


      <style type="text/css">
            .itemStyle
            {
                  background-color: #D8D8D8;
                  font-family: Verdana;
                  list-style: none;
            }
      </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
      <table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-left: 15px;">
            <tr>
                  <td valign="top" align="left" style="padding-top: 20px; padding-bottom: 23px; font-size: 17px">
                        <b>Edit Garment Order:</b>&nbsp<asp:Label ID="lblProgramName" runat="server" Text="Bind ProgramName"></asp:Label>
                  </td>
            </tr>
            <tr>
                  <td valign="top" align="left" style="padding-top: 2px; padding-bottom: 23px; font-size: 13px">
                        Select the item and use ‘Up/Down’ key to set the order in which they are displayed
                        on the web store.
                  </td>
            </tr>
            <tr>
                  <td valign="top" align="left" id="tdRepeater" runat="server">
                        <asp:Repeater ID="rptArrangeProgram" runat="server">
                           <ItemTemplate>
                                    <table width="68%" cellpadding="3" cellspacing="5">
                                          <tr class="itemStyle" style="">
                                                <td id="<%#Eval("sku")%>" style="border: solid 1px #000000;">
                                                      <%#Eval("Name")%>
                                                </td>
                                          </tr>
                                    </table>
                              </ItemTemplate>
                        </asp:Repeater>
                  </td>
            </tr>
      </table>
<&lt;/asp:Content>



函数加载了值,所以我该如何放下中继器的项目




And function is loaded the value so how can i drop and down the item of repeater


private void GetProgramProductsForRearrange()
       {
           Session["storeID"] = 540;//60;
           Session["programId"] = 1090;// 23;
           int StoreId = Convert.ToInt32(Session["storeID"]);
           int ProgramId = Convert.ToInt32(Session["programId"]);
           DataTable dtArrangeProgram = objProgramList.ACSSelectProgramProductsForRearrange(StoreId,ProgramId);
           if (dtArrangeProgram != null && dtArrangeProgram.Rows.Count > 0)
           {
               rptArrangeProgram.DataSource = dtArrangeProgram;
               rptArrangeProgram.DataBind();
           }
       }

推荐答案

您可能想看看以下 http: //jqueryui.com/demos/sortable/ [ ^ ]
You may want to have a look at this http://jqueryui.com/demos/sortable/[^]


我在CP中找到了这个

在ASP.NET 2.0中拖放GridView项以进行订购 [使用JavaScript将产品拖放到购物篮 [
I found this in CP

Drag and drop GridView items for ordering, in ASP.NET 2.0[^]

Also this
Drag and Drop Products to the Shopping Basket Using JavaScript[^]


这篇关于拖曳带有中继器控制项模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆