Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
webdatatree databinding with dataset
posted

Hi,

I am new to webdatatree. I wrote the fallowing code to bind the webdatatree.

Here my datasource is normal dataset which has multiple tables with proper relations.

But I am unable to bind to webdatatree.Is there something wrong with my code?

 UWT_Departments.DataSource = dsetMenuNodes;

for (int iCount = 0; iCount < dsetMenuNodes.Tables.Count; iCount++)
                 {
                     DataTreeNodeBinding db = new DataTreeNodeBinding();
                     db.DataMember = dsetMenuNodes.Tables[iCount].TableName;
                     db.TextField = "vGroup_Name";
                     db.ValueField = "intGroup";
                     UWT_Departments.DataBindings.Add(db);
                 }
                 UWT_Departments.DataBind();

Do I need to use WebHierarchicalDataSource to bind webdatatree? If So can you give an example to convert normal dataset to WebHierarchicalDataSource.

Parents
No Data
Reply
  • 5105
    Suggested Answer
    Offline posted

    Hi there,

    Please don't forget to set primary keys for the tables in your dataset. Once you do this your issue should go away :)

    Thank you for using the Infragistics forums!

Children
No Data