Here i have explained how to Drag and Drop Gridview Rows in Asp.Net C#.

Step 1) Add HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<title>Drag and Drop Gridview Rows in Asp.Net C#.</title>
<script type="text/javascript" src=""></script>
<script src="jquery.tablednd.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
<form id="form1" runat="server">
<h1>Drag and Drop Gridview Rows in Asp.Net C#.</h1>
<asp:GridView ID="gvDetails" runat="server"> </asp:GridView>

Step 2) Import Namespaces

using System;
using System.Data;

Step 3) C#

protected void Page_Load(object sender, EventArgs e)
//Dynamically create & bind data to gridview
protected void BindGridviewData()
DataTable dt = new DataTable();
dt.Columns.Add("UserId", typeof(Int32));
dt.Columns.Add("UserName", typeof(string));
dt.Columns.Add("Education", typeof(string));
dt.Rows.Add(1, "Imran Khan", "B.Tech");
dt.Rows.Add(2, "Fatima Ali", "BA");
dt.Rows.Add(3, "Ram Shankar", "MS");
dt.Rows.Add(4, "Narendra Tiwari", "B.Tech");
dt.Rows.Add(6, "Mani Anuragam", "MD");
dt.Rows.Add(7, "Waseem Mirza", "B.Tech");
dt.Rows.Add(8, "Bilal Ahmed", "CA");
gvDetails.DataSource = dt;


Add Comments