Tree view drag drop changes parent ID in Database

1 posts, 0 answers
  1. umar
    umar avatar
    10 posts
    Member since:
    Nov 2010

    Posted 17 Jan 2011 Link to this post

    i am using treeview and gets parent id from database..if i will drop node to another parent it should change its parent id in database also..Plz share your views..
    SqllConnection con = new SqlConnection("Server=HUZAIF-PC;Database=ShoppingOnline;Integrated Security=True");
            SqlCommand cmd = new SqlCommand("SELECT * FROM product_table",con);
            SqlDataAdapter da = new SqlDataAdapter(cmd);
           // da.SelectCommand.Parameters.Add("@parentID", SqlDbType.VarChar, 50).Value = parentID;
            DataTable links = new DataTable();
            treeView.DataTextField = "product_Name";
            treeView.DataFieldID = "product_ID";
            treeView.DataFieldParentID = "parent_ID";
            treeView.DataValueField  = "product_ID";
            treeView.DataSource = links;
Back to Top