Click here to Skip to main content
11,577,710 members (63,072 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET4.0
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 at 4-Jul-12 1:24am
thanks i will check
ythisbug at 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 at 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 at 5-Jul-12 2:13am
ok my table btID is pmkey.
Sandeep Mewara at 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
0 Peter Leow 180
1 DamithSL 170
2 Richard MacCutchan 125
3 OriginalGriff 115
4 Abhinav S 100
0 OriginalGriff 820
1 Sergey Alexandrovich Kryukov 681
2 Abhinav S 528
3 F-ES Sitecore 420
4 Suvendu Shekhar Giri 375

Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 4 Jul 2012
Copyright © CodeProject, 1999-2015
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