Click here to Skip to main content
13,145,068 members (54,408 online)
Rate this:
Please Sign up or sign in to vote.
See more:
hi am using dynamic in my project while editing and adding node am getting error..
"These columns don't currently have unique values."

here is my page load code

 protected void Page_Load(object sender, EventArgs e)
            verticalSplitterTreeAndInput.LeftDivId = divTree.ClientID;
            verticalSplitterTreeAndInput.RightDivId = divInput.ClientID;
            BidTreeBLL btBLL = new BidTreeBLL();
            dt = btBLL.GetBidTreeFromSessionDatatable();
            GridView1.DataSource = dt;
           tvBidTree.DataFieldID = "btNodeID";//
           tvBidTree.DataFieldParentID = "btParentNodeID";//
           tvBidTree.DataTextField = "btName";//
           tvBidTree.DataValueField = "btNodeID";//
           tvBidTree.DataSource = dt;//
           tvBidTree.DataBind(); //to this line am getting error
        tvBidTree.FindNodeByValue("0").Expanded = true; //commented on 29/06

        if (!IsPostBack)
            tvBidTree.AllowNodeEditing = true;
            tvBidTree.FindNodeByValue("0").AllowEdit = false; //commented on 29/06
        ScriptManager.RegisterStartupScript(Page, typeof(Page), "KetMessageDivAnimation", "messageDivAnimation('" + SessionManager.JsControlHideSeconds + "');", true);
        //ScriptManager.RegisterStartupScript(Page, typeof(Page), "resetWBSTreeDiv", "resetWBSTreeDiv();", true);

please any one help me to solve this..thank you
Posted 3-Jul-12 19:06pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Check if any value for btNodeID is present more than once in the datatable dt.

Your nodeId's should be unique and it sounds like that your code is trying to assign already used nodeId once again when binding to treeview.
ythisbug 4-Jul-12 1:24am
thanks i will check
ythisbug 4-Jul-12 1:52am
your rite its assigning already used nodeid once again..can u suggest me again wat have to do
Sandeep Mewara 4-Jul-12 15:29pm
Just makes sure you have unique values of nodeid!

Use primary key as the node id reference, that will provide the uniqueness.
ythisbug 5-Jul-12 2:13am
ok my table btID is pmkey.
Sandeep Mewara 5-Jul-12 2:24am

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170915.1 | Last Updated 4 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100