Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys!

I have a grid view. Inside of it is an EDIT command. If the user selects that command, a popup will display. I am required to make it drag able whenever/ wherever the user wants to place it. I searched on the net and find one. First, I tried the codes itself and it works fine. But when I combined it with my codes, it does not working. Please someone help me :)

Here is my codes:

ASP.NET
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<link rel="stylesheet" type="text/css" href="Style/loginstyle.css" />
 
<meta charset="utf-8"/>
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css"/>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css"/>
<script>
$(function () {
$("#dialog").dialog();
});
</script>
 
<style type="text/css">
//My code for designing...
</style>
 
</asp:Content>

<%-- edit milestone popup --%>
ASP.NET
<asp:LinkButton Text="" ID="lnkFake" runat="server" />
<cc1:ModalPopupExtender ID="milestone_popup"  runat="server" PopupControlID="milestonepnlPopup" TargetControlID="lnkFake"
CancelControlID="btnClosemilestone" BackgroundCssClass="milestonemodalBackground">
</cc1:ModalPopupExtender>
<asp:Panel ID="milestonepnlPopup" runat="server" CssClass="milestone_modalPopup" Style="display: none">
<div class="header" id="dialog">
Edit Milestone
</div>
<div class="body">
<table border="0" style="text-align: center" align="left">
<tr>
<td>
<table>
<tr>
<td>
<asp:Label ID="Label10" runat="server" Text="Milestone Code:"></asp:Label>
</td>
<td>
<asp:TextBox ID="lblmilestone_popup_code" runat="server"></asp:TextBox>
<%--<asp:Label ID="lblmilestone_popup_code" runat="server" Text=""></asp:Label>--%>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label11" runat="server" Text="Order Number:"></asp:Label>
</td>
<td>
<asp:TextBox ID="lblmilestone_popup_orderno" runat="server"></asp:TextBox>
<%-- <asp:Label ID="lblmilestone_popup_orderno" runat="server" Text="Label"></asp:Label>--%>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label9" runat="server" Text="Milestone Name:"></asp:Label>
</td>
<td>
<asp:Label ID="lblmilestonename_popup_name" runat="server" Text="" Font-Bold="true"></asp:Label>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<asp:Label ID="lblmilestone_status" runat="server"></asp:Label>
</td>
<td style="vertical-align:top">
<asp:RadioButtonList ID="rrd_milestone_status" runat="server">
<asp:ListItem Selected="False" Value="Active">Active</asp:ListItem>
<asp:ListItem Selected="False" Value="Inactive">Inactive</asp:ListItem>
</asp:RadioButtonList>
Posted
Updated 14-Sep-14 17:23pm
v3

The JQuery dialog is movable by itself - http://jqueryui.com/dialog/[^].

JQuery provides a Draggable interaction[^].
Use this to make the popup movable.
 
Share this answer
 
Comments
DarkDreamer08 14-Sep-14 23:19pm    
I put those links and scripts in my code. But nothing happens. i cannot move the popup.
I just omit the codes that I added from the net. and I include to the Modal Popup Extender propertied Drag= true and add the Popup Drag Handle Control ID :) and it works fine!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900