Treeviews

  • Thread starter Thread starter JJ
  • Start date Start date
J

JJ

Ok Guys,

I have a dataset and I need to make a treeview out of
it. I want checkboxs and icons to show on the tree. What
is the easiest way to get this dataset setup for a parent-
Child treeview?

Thanks,

JJ
 
JJ,

There is no easy way. There is no databinding model set for the
treeview. You will have to iterate through the items in your dataset and
set up the treeview accordingly.

Hope this helps.
 
If the dataset is generated by SQL Server, you could write a stored
procedure to return the tree structure as XML and write a few simple lines
of code to recursively step through it.

Nicholas Paldino said:
JJ,

There is no easy way. There is no databinding model set for the
treeview. You will have to iterate through the items in your dataset and
set up the treeview accordingly.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

JJ said:
Ok Guys,

I have a dataset and I need to make a treeview out of
it. I want checkboxs and icons to show on the tree. What
is the easiest way to get this dataset setup for a parent-
Child treeview?

Thanks,

JJ
 
Don't you guys find this amazing? Here 75% of the data
that we bring back from databases needs to put in some
sort of Hierarchial representation and their is nothing
to allow us to easily do this! Mind boggeling.

Thanks,
JJ
-----Original Message-----
If the dataset is generated by SQL Server, you could write a stored
procedure to return the tree structure as XML and write a few simple lines
of code to recursively step through it.

"Nicholas Paldino [.NET/C# MVP]"
message news:[email protected]...
JJ,

There is no easy way. There is no databinding model set for the
treeview. You will have to iterate through the items in your dataset and
set up the treeview accordingly.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Ok Guys,

I have a dataset and I need to make a treeview out of
it. I want checkboxs and icons to show on the tree. What
is the easiest way to get this dataset setup for a parent-
Child treeview?

Thanks,

JJ


.
 
Ed,

How does bringing back the dataset as xml help me?

Thanks,

JJ



-----Original Message-----
If the dataset is generated by SQL Server, you could write a stored
procedure to return the tree structure as XML and write a few simple lines
of code to recursively step through it.

"Nicholas Paldino [.NET/C# MVP]"
message news:[email protected]...
JJ,

There is no easy way. There is no databinding model set for the
treeview. You will have to iterate through the items in your dataset and
set up the treeview accordingly.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Ok Guys,

I have a dataset and I need to make a treeview out of
it. I want checkboxs and icons to show on the tree. What
is the easiest way to get this dataset setup for a parent-
Child treeview?

Thanks,

JJ


.
 
It means the code for populating the treeview is very short and a lot of the
processing is offloaded from the client to the SQL Server. As XML is a
hierarchical tree, it's a very natural way to populate a treeview.

You will need to investigate how to use the FOR XML EXPLICIT command in
T-SQL.


JJ said:
Ed,

How does bringing back the dataset as xml help me?

Thanks,

JJ



-----Original Message-----
If the dataset is generated by SQL Server, you could write a stored
procedure to return the tree structure as XML and write a few simple lines
of code to recursively step through it.

"Nicholas Paldino [.NET/C# MVP]"
message news:[email protected]...
JJ,

There is no easy way. There is no databinding model set for the
treeview. You will have to iterate through the items in your dataset and
set up the treeview accordingly.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Ok Guys,

I have a dataset and I need to make a treeview out of
it. I want checkboxs and icons to show on the tree. What
is the easiest way to get this dataset setup for a parent-
Child treeview?

Thanks,

JJ


.
 
Back
Top