Hi all. Is there a simple example for binding a dataset with only one table to the tree control? I already saw the sample code for the infragistics online samples, but that is for 3 tables, and I'm wondering what are the minimum code needed. Thanx.
the examples show msaccess. But, how do we know which code we can remove and still get it to work for a practical database such as SQL server? the help doesn't give any samples, and the samples are not practicle at all. Shouldn't there be complete documentation and samples on how to perform every single method of binding data to the tree control, and all controls for that matter? Of course, the answer is yes, but there is next to no help at all. And, support just gives a little bit of info, but of course there is just way too much information missing.
The database you use shouldn't matter. Once you get the data into an ADO.NET DataSet, how WebTree (or other controls) interact with that DataSet is no different, whether the data came from SQL Server, MS Access, or a method call that never touches a database.
Documentation on binding to a DataSet was removed, primarily because it became so difficult to work with DataSet objects in .NET 2.0 (since you can no longer add components to a webpage at design-time). Information on doing this is still provided in our Knowledge Base, however:HOWTO: Binding [WebTree] to a DataView
If you only have a single table of data with no relations, then you only need to set the Levels[0].ColumnName property; you don't need to set the Levels[0].RelationName if there's no relation to work with.
Since I'm not sure why you'd use WebTree to display flat data, I suspect your "one table" may actually be a self-referencing table. If that's the case, the following Knowledge Base article may help:HOWTO: How to bind the WebTree to a self-referencing table