这些列目前没有唯一值。 [英] These columns don't currently have unique values.?

查看:393
本文介绍了这些列目前没有唯一值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我在我的项目中使用动态编辑和添加节点时收到错误..

这些列目前没有唯一值。



这里是我的页面加载代码



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;
          GridView1.DataBind();

          tvBidTree.DataFieldID = "btNodeID";//
          tvBidTree.DataFieldParentID = "btParentNodeID";//

          tvBidTree.DataTextField = "btName";//
          tvBidTree.DataValueField = "btNodeID";//

          tvBidTree.DataSource = dt;//
          tvBidTree.DataBind(); //to this line am getting error

       }
       tvBidTree.ExpandAllNodes();//
       tvBidTree.FindNodeByValue("0").Expanded = true; //commented on 29/06


       if (!IsPostBack)
       {
           ClearControls();
           ClearDynamicControls();
           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

推荐答案

检查 btNodeID 的任何值是否在数据表<$ c $中出现多次C> DT 。



你的nodeId应该是唯一的,听起来你的代码试图在绑定到treeview时再次分配已经使用过的nodeId。
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.


Quote:

检查datatable.if父表中具有重复值的casesentivie属性然后它将抛出异常'这些列don '目前有唯一值'。

默认情况下,数据表将忽略大小写敏感,读作'A'和'a'相同。

Check for the casesentivie property in the datatable.if parent table having duplicate values then it will throw the exception 'These columns don't currently have unique values'.
BY default datatable will ignore the casesensitivity and read as 'A' and 'a' are same.


这篇关于这些列目前没有唯一值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆