sorry to ask new question in this thread ,,, i paste the code and in this code i told in detail how i solved my problem,,thans alot for giving me your precious time,
<script type = "text/javascript">
$("#GridView1").sortable({
items: 'tr:not(tr:first-child)',
cursor: 'crosshair',
connectWith: '#GridView2',
axis: 'y',
dropOnEmpty: true,
receive: function (e, ui) {
$(this).find("tbody").append(ui.item);
}
});
});
</script>
in thisjquery funtcion instead if " $("#GridView").sortable({"
i add the id $("#cs100_placeholder1_GridView1").sortable({"
so to drag drop items using master page code will be like this, becuase when we use master page grid view id is changed in run time and if we
add simple grid view id ,its not work,
<script type = "text/javascript">
$(function () {
$("#cs100_placeholder1_GridView1").sortable({
items: 'tr:not(tr:first-child)',
cursor: 'crosshair',
connectWith: '#cs100_placeholder1_GridView2',
axis: 'y',
dropOnEmpty: true,
receive: function (e, ui) {
$(this).find("tbody").append(ui.item);
}
});
});
</script>
<style type = "text/css">
.drag_drop_grid th,.drag_drop_grid td{width:50px;}
.drag_drop_grid td{cursor:pointer}
</style>
<body>
<asp:GridView ID="GridView1" runat="server" CssClass = "drag_drop_grid" AutoGenerateColumns = "false">
<Columns>
<asp:BoundField DataField = "Item" HeaderText = "Item" ItemStyle-CssClass = "ui-state-default" />
<asp:BoundField DataField = "Price" HeaderText = "Price" ItemStyle-CssClass = "ui-state-default"/>
</Columns>
</asp:GridView>
<hr />
<asp:GridView ID="GridView2" runat="server" CssClass = "drag_drop_grid" AutoGenerateColumns = "false">
<Columns>
<asp:BoundField DataField = "Item" HeaderText = "Item" ItemStyle-CssClass = "ui-state-highlight" />
<asp:BoundField DataField = "Price" HeaderText = "Price" ItemStyle-CssClass = "ui-state-highlight"/>
</Columns>
</asp:GridView>
</boby>