Hello to all I am making a windows application in c#..In that i have a treeview. I am giving the same functionality as I have given in Web application of tree view plz see a look of web treeview--
Now in desktop treeview the the name of file is not coming in there corresponding file, labels are running here and there plz see a desktop treeview--
Note:--The first image is Web treeview and the second image is desktop treeview..
I have taken table layout panel in designing and on cs page I am generating label dynamically and adding those label in table layout panel..
But not coming correct
for (j = i; j < i + itemperrow; j++)
{
Label lbl = new Label();
PictureBox img = new PictureBox();
this.radContextMenuManager1.SetRadContextMenu(img, this.radContextMenu2);
img.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
img.Name = "imgbtn_" + dt.Rows[j]["NodeID"].ToString();
img.MouseEnter += new EventHandler(img_MouseEnter);
if (dt.Rows[j]["nodetype"].ToString() == "Folder")
{
img.Image = Properties.Resources.folder_icon;
}
lbl.Name = "lbl_" + dt.Rows[j]["NodeID"].ToString();
lbl.Text = dt.Rows[j]["NodeHTML"].ToString();
lbl.ForeColor = System.Drawing.ColorTranslator.FromHtml("#000000");
tableLayoutPanel1.Controls.Add(img);
tableLayoutPanel1.Controls.Add(lbl);
}
plz help me
Now in desktop treeview the the name of file is not coming in there corresponding file, labels are running here and there plz see a desktop treeview--
Note:--The first image is Web treeview and the second image is desktop treeview..
I have taken table layout panel in designing and on cs page I am generating label dynamically and adding those label in table layout panel..
But not coming correct
for (j = i; j < i + itemperrow; j++)
{
Label lbl = new Label();
PictureBox img = new PictureBox();
this.radContextMenuManager1.SetRadContextMenu(img, this.radContextMenu2);
img.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
img.Name = "imgbtn_" + dt.Rows[j]["NodeID"].ToString();
img.MouseEnter += new EventHandler(img_MouseEnter);
if (dt.Rows[j]["nodetype"].ToString() == "Folder")
{
img.Image = Properties.Resources.folder_icon;
}
lbl.Name = "lbl_" + dt.Rows[j]["NodeID"].ToString();
lbl.Text = dt.Rows[j]["NodeHTML"].ToString();
lbl.ForeColor = System.Drawing.ColorTranslator.FromHtml("#000000");
tableLayoutPanel1.Controls.Add(img);
tableLayoutPanel1.Controls.Add(lbl);
}
plz help me