TreeView structure
Code .NET SQL :: ASP.NET :: C# :: TreeView
Page 1 sur 1
TreeView structure
- Code:
void Page_Load(object sender, EventArgs e)
{
vehiculeNodes();
}
void vehiculeNodes() {
DataSet dst = TreeViewDataSet();
foreach (DataRow masterRow in dst.Tables["Marque"].Rows)
{
TreeNode masterNode = new TreeNode((string)masterRow["marque"]);
TreeView1.Nodes.Add(masterNode);
foreach (DataRow childRow in masterRow.GetChildRows("Children"))
{
TreeNode childNode = new TreeNode((string)childRow["model"]);
masterNode.ChildNodes.Add(childNode);
childNode.NavigateUrl = "AllCars.aspx?searchByMarque=" + masterNode.Text
+ "&searchByAnnee&searchByKilometre=&searchByModele=" + childNode.Text;
}
}
}
Code .NET SQL :: ASP.NET :: C# :: TreeView
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum