I got a gridview which I created with following code when user clicked one of treview node I have to populate a radgrid for given departmen. I dont know how can I catch treeview click event and without making any postback populate radgrid for clicked departmen. All help will be apreciated, thank you in advance.
//Load Root Nodes... |
private void LoadRootNodes() |
{ |
SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Personelcon"].ConnectionString); |
SqlCommand selectCommand = new SqlCommand("SELECT * FROM Department WHERE Reportsto IS NULL", connection); |
SqlDataAdapter adapter = new SqlDataAdapter(selectCommand); |
DataTable data = new DataTable(); |
adapter.Fill(data); |
foreach (DataRow row in data.Rows) |
{ |
RadTreeNode node = new RadTreeNode(); |
node.ImageUrl = "themes/default/entity.gif"; |
node.Text = row["Dname"].ToString(); |
node.Value = row["Departmenid"].ToString(); |
node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack; |
RadTreeView1.Nodes.Add(node); |
} |
} |