Treeview having checkbox
<p>I have one treeview with checkboxes.I am feeling it dynamically.
Here is sample treeview</p>

<pre><code>[]MCA
     []SEM:1
              []Subject
                        []C
                        []OS
                        []DCN
     []SEM:2

     []SEM:3 
             []Assignment
</code></pre>

<p>Something like that.MCA is first node.It has 3 child node called SEM-1,SEM-2,SEM-3.SEM-1 also has child called Subject.Subject has 3 child(C,DCN,OS)
table structure like this.</p>

<p>table1:</p>

<pre><code>id Name          Parentid     loginid
1  MCA           Null         1
2  SEM-1         1            1
3  Subject       2            1
4  C             3            1
5  OS            3            1
6  DCN           3            1
7  SEM-2          1           1
8  SEM-3          1           1
</code></pre>

<p>When user select proper user from dropdownlist,treeview should check 
appropriate checkbox.
By executing the query,I am able to find out the id.
query1 : select id from table1 where loginid = 1
store all id in arraylist.
Access one by one using for loop.</p>

<pre><code>TreeNode node;
foreach(int i=0;i&lt;= Treeview.Nodes.count ;i++)
{ node = this.Treeview.Node[i];
  foreach(string str in Arraylist1)
{
 string id = str;
 if(id= = Node.Value)
{
  Node.check = true;
}
  if(Node== check)
{
 // Select id from table by passing value of id to parentid
// select id from table where parentid = id;
// user for loop to one by one id
// foreach(TreeNode child in Node.childNode)
{
  // Child.value == above id
}
}
}
}
</code></pre>

<p>It check upto 2 level.But how check inner .
Means MCA and SEM part.Not inside part.</p>
