Thanks for the Reply Peter.
But its not what is needed.
is just a collection of TreeNodes.
Whats needed is a Collection
that stores object in a key value pair format which doesn't sort the objects by key.
An Elaboration on the program.
Here TreeView is being populated without recursive function using
a Single Recursive Query
to get the child nodes of corresponding parents (and grandparents for that matter:)) since it is much faster.
The Query is as follows
CREATE PROCEDURE [dbo].[SP_RecursionEmp]
WITH RecEmp AS(SELECT emp_id,emp_name,parent_id,0 as depth
SELECT E.emp_id,E.emp_name,E.parent_id,R.depth+1 AS depth FROM
tbl_simple_employees AS E INNER JOIN RecEmp AS R ON R.emp_id=E.parent_id )
SELECT max(emp_id)as emp_id,max(emp_name)as emp_name,max(parent_id)as parent_id,max(depth)as depth FROM RecEmp r group by emp_id order by depth
now i took the result in a DataSet
and passed it to a
custom created function as follows
private void TreeViewPopulation(DataSet ds)
what I need is a C# Code to implement it.
The Code has been implemented in VB
I would like to have the Conversion in C#.
Ã¯Â¿Â½You can cut all the flowers but you cannot keep spring from coming.Ã¯Â¿Â½