FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Grids
Link Posted: 01-May-2008 05:50
Is there a supported way to achieve a look like that found at:

--link removed--

I'm want to end up with a similar appearance though I have been strongly considering your TreeView.
Link Posted: 01-May-2008 07:43
Yes, there is a way. But this would not be an honest way to get datagrid.
Every node.Text should contain some html, with TABLE element as its content, with fixed-width 2dn and 3rd columns and flexible first one.
I know, one of our customers did this.
Link Posted: 01-May-2008 07:45
Please let me know, if you're interested, so I can create you a code snippet for this.
Link Posted: 01-May-2008 07:52
Sounds great.  Thanks for the quick response.
Link Posted: 01-May-2008 08:18
I've created a small demo page with nodes added programmatically. The same approach can be used for databinding (handle NodeDataBound event) and even load-on-demand. Of course, everything can be adjusted to your needs. It's just a demo. Create a blank page and put this code into it: [code] <%@ Register Assembly="NineRays.WebControls.FlyTreeView" Namespace="NineRays.WebControls" TagPrefix="NineRays" %> private void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { for (int i = 0; i < 10; i++) { FlyTreeNode node = CreateNode(); for (int k = 0; k < 3; k++) { FlyTreeNode level2Node = CreateNode(); for (int m = 0; m < 2; m++) { FlyTreeNode level3Node = CreateNode(); level2Node.ChildNodes.Add(level3Node); } node.ChildNodes.Add(level2Node); } FlyTreeView1.Nodes.Add(node); } } } private int _number; // creates a 3-column node private FlyTreeNode CreateNode() { _number++; // sample values string nodeText = string.Format("Node {0}", _number); string value1 = string.Format("Value1: {0}", _number); string value2 = DateTime.Now.ToLongDateString(); FlyTreeNode node = new FlyTreeNode(); node.Text = string.Format(@"
{0}{1}{2}
", nodeText, value1, value2); return node; }
Node Column1 Column2
[/code]
Link Posted: 01-May-2008 08:46
Looks great.