This is a migrated thread and some comments may be shown as answers.

tree view in winforms

1 Answer 35 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 04 May 2011, 07:30 AM
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
                

1 Answer, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 06 May 2011, 11:59 AM
Hi goldy,

Unless there is something that I do not understand, your question seems to be related to the TableLayoutPanel control. I would kindly ask you to address your questions regarding this control in the appropriate Microsoft Forums. You can read more about the control in this MSDN article.

Greetings,
Svett
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
Treeview
Asked by
Jack
Top achievements
Rank 1
Answers by
Svett
Telerik team
Share this question
or