gpt4 book ai didi

c# - Telerik RadListBox 不想拖动

转载 作者:太空宇宙 更新时间:2023-11-03 16:33:09 29 4
gpt4 key购买 nike

在我的 asp.net 解决方案中,我尝试使用列表框拖放功能(如本例所示:http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/draganddrop/defaultcs.aspx)。但我现在遇到的问题是拖放不起作用。而不是拖动它的标记项目...我试图将 html 直接复制到我的页面,但它仍然不起作用。有什么想法可能是错误的吗?

是因为我想念 CSS 吗?

查看:

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<!-- ## HEAD SECTION ## -->
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentToolbar" runat="server">
<!-- ## SCRIPT MANAGER ## -->
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
<Scripts>
<asp:ScriptReference Path= "~/Scripts/jquery-1.2.6.pack.js" />


</Scripts>
</asp:ScriptManagerProxy>
<%if(false) {%>
<script src="../../Scripts/jquery-1.2.6-vsdoc.js" type="text/javascript"></script>
<%} %>

<!-- ## AJAX MANAGER ## -->
<!-- ## AJAX MANAGER ## -->
<telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest" runat="server">
</telerik:RadAjaxManager>
<!-- ## TOOLBAR ## -->
<telerik:RadToolBar ID="RadToolBar1" runat="server"
OnButtonClick="Toolbar_ButtonClick"
EnableEmbeddedSkins="False"
OnClientButtonClicked="OnClientButtonClicked"
CssClass="pickers_width"
Skin="AgendaSkin">
<Items>
<telerik:RadToolBarButton AccessKey="<%$ Resources:Shortcuts, GLOBAL_SAVE %>"
PostBack="false"
Text="<%$ Resources:Language, Generel.Expression.SaveAndClose %>"
CommandName="SAVEANDCLOSE"
Value="SAVEANDCLOSE"
ImageUrl="~/Images/Icons/save_16.png"></telerik:RadToolBarButton>

<telerik:RadToolBarButton AccessKey="<%$ Resources:Shortcuts, POPUPS_RETURN %>"
PostBack="False"
Text="<%$ Resources:Language, Generel.Expression.Close %>"
CommandName="CLOSE"
ImageUrl="~/Images/Icons/close_16.png"></telerik:RadToolBarButton>
</Items>
</telerik:RadToolBar>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentHeader" runat="server">

<!-- ## HEADER (TITLE BAR) ## -->


</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="ContentWorkspace" runat="server">
<div class="pickers_workspace_row_margin">
<!-- ## WORKSPACE ## -->
<div class="prof_item">
<asp:Panel ID="pnlRoleList" runat="server" CssClass="prof_item_value_section">

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" CssClass="example-panel">
<telerik:RadListBox ID="RadListBox1" runat="server" Width="200px" Height="200px"
SelectionMode="Single" AllowReorder="true"
EnableDragAndDrop="true" OnDropped="RadListBox1_Dropped">

</telerik:RadListBox>
</telerik:RadAjaxPanel>
</asp:Panel>
</div>
</div>
<asp:HiddenField runat="server" ID="hidRoleInObjectUId" />
<asp:HiddenField runat="server" ID="hidRoleInObjectName" />
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentScripts" runat="server">

<!-- ## SCRIPT SECTION ## -->
<script type="text/javascript" language="javascript">

function CloseWindow() {
// Return userdata to calling window
if (window.opener != null) {
window.opener.ClearBlocker();
window.ReturnFunction();
window.close();
}
}



function SaveEditedFields(commandName) {
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.ajaxRequest(commandName);
}

function OnClientButtonClicked(sender, args) {
var button = args.get_item();
var commandName = args.get_item().get_commandName()

switch (commandName) {
case "SAVEANDCLOSE":
SaveEditedFields(commandName);
break;

case "SAVE":
SaveEditedFields(commandName);
break;

case "CLOSE":
CloseWindow();
break;
}
}

</script>

</asp:Content>

CS :

    private void FillMandatoryItemFirstList(Guid item_guid)
{
//MandatoryItems First



IEnumerable<MandatoryItem> mandatoryFirst = MandatoryItem.GetMandatoryItemByCommitteeAndPos(item_guid, Enums.GetGuidFromEnum(Enums.AgendaElementPositionEnum.PosFirst));
foreach (var item in CheckCount(mandatoryFirst))
{
RadListBox1.Items.Add(new RadListBoxItem(item.UIdHandlingItemHandlingItem.Title, item.Id.ToString()));

}

}

最佳答案

您是否尝试过用 RadScriptManager 替换您的标准 ScriptManager?

关于c# - Telerik RadListBox 不想拖动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10138254/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com