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

RadCollapsiblePanel isExpandad

20 Answers 473 Views
CollapsiblePanel
This is a migrated thread and some comments may be shown as answers.
Arif
Top achievements
Rank 1
Arif asked on 15 May 2014, 01:11 PM


Hello Telerik Team,


I have a question about the radcollapsiblepanel. When

I create a new collapsiblepanel programmatically the isExpanded property is not

working.

01.public partial class Form1 : Form
02.  {
03.      public Form1()
04.      {
05.          InitializeComponent();
06.          RadCollapsiblePanel pn = new RadCollapsiblePanel();
07.          pn.Dock = DockStyle.Left;
08.          pn.ExpandDirection = RadDirection.Right;
09. 
10.          pn.IsExpanded = false;    <------ Is not working
11. 
12.          this.Controls.Add(pn);          
13.         
14.      }
15.  }



 



Is there something that I’m missing?





Kindest
regards,

Arif

20 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 16 May 2014, 02:38 PM
Hi Arif,

Thank you for writing.

When you are initializing the control this way in the forms constructor it is still not loaded and this is why it is not collapsed. In this case you can either call the LoadElementTree method before setting the IsExpanded property or just set this property in the form's Load event:
RadCollapsiblePanel pn = new RadCollapsiblePanel();
 
public Form1()
{
    InitializeComponent();
 
    pn.Dock = DockStyle.Left;
    pn.ExpandDirection = RadDirection.Right;
 
    pn.LoadElementTree();
    pn.IsExpanded = false;
 
    this.Controls.Add(pn);  
}
 
private void Form1_Load(object sender, EventArgs e)
{
    pn.IsExpanded = false;
}

Also I have noticed that you have posted identical post and we have deleted it in order to avoid such duplicate posts in our forum.

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Abbas
Top achievements
Rank 1
answered on 07 Mar 2015, 01:04 PM
Hello Telerik Team,

I would like to RadCollapsible panel be collapsed when the form is loaded and showing for the first time.
IsExpanded property just collapsed the already spread RadCollapsible control on the form.

Regards,
Abbas


0
Abbas
Top achievements
Rank 1
answered on 11 Mar 2015, 07:24 AM
Up.
0
Dimitar
Telerik team
answered on 11 Mar 2015, 02:18 PM
Hello Abbas,

Thank you for writing.

The animations slow down the collapse process and this is why the panel is still visible when the form is shown. You can disable the animation when the form is loaded and the panel will be collapsed when the form is started:
RadCollapsiblePanel pn = new RadCollapsiblePanel();
  
public RadForm1()
{
    InitializeComponent();
  
    pn.Dock = DockStyle.Left;
    pn.ExpandDirection = RadDirection.Right;
    pn.EnableAnimation = false;
    pn.LoadElementTree();
    pn.IsExpanded = false;
     
    this.Controls.Add(pn);
    pn.EnableAnimation = true;
}

Please let me know if there is something else I can help you with. 
 
Regards,
Dimitar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 03 Nov 2018, 04:57 AM
How to create dynamic vertical scroll bar in RadCollapsiblePanel Panel container ? can please give me the procedure to create dynamic scroll bar for RadCollapsiblePanel Panel container
0
Dimitar
Telerik team
answered on 05 Nov 2018, 09:23 AM
Hello,

The scrollbars should appear automatically if the control is docked. I have attached an example that shows this.

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 05 Nov 2018, 10:42 AM
i din find any code in file that you have given me
0
Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 05 Nov 2018, 10:50 AM
i have a attached a file
0
Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 05 Nov 2018, 10:57 AM
How to create dynamic vertical scroll bar in RadCollapsiblePanel Panel container ? how to give vertical scroll value into it
0
Dimitar
Telerik team
answered on 05 Nov 2018, 12:49 PM
Hello,

I created the project at design time. There is no explicit code for the scrollbar. Once there is a control that is outside of the visible area the scroll will appear. I am not sure why this is not working on your side. Would it be possible to open a ticket and attach the code from your form? This way we will be able to properly investigate this and determine why this is not working.

I am looking forward to your reply.
 
Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nidal
Top achievements
Rank 1
answered on 28 Apr 2019, 05:52 AM
In the following try I put the size for radimagebutton but it look like in image1
RadImageButtonElement btnimage = new RadImageButtonElement
            {
                Image =newImage,
                Size=new Size(20,20)
               
            };
          
radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.Children.Insert(0, btnimage);
0
Nidal
Top achievements
Rank 1
answered on 28 Apr 2019, 06:14 AM
I solved it by setting the auto size to false thank you
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Apr 2019, 12:11 PM
Hello, Nidal,     

I am glad that the problem you were facing is now resolved. I have noticed that you have posted identical questions in multiple forum threads. We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nidal
Top achievements
Rank 1
answered on 30 Apr 2019, 09:58 AM

I have the following menu header items (rad collapsible panel header) in "pictuer1".

I use the following property to set alignment :

 radCollapsiblePanel1.CollapsiblePanelElement.StretchVertically = true;
radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.ElementSpacing = 15;

Problem :

but when I increase the size of screen the space between icons also increase like pictuer2 

my question :

I need to make the menu icon fixed on top and the size between other icons is fixed when I increase the screen size .

 

 

 

 

 

0
Dimitar
Telerik team
answered on 30 Apr 2019, 01:25 PM
Hi Nidal,

Instead of setting the AutoSize and Size just set the margin. You can leave the ElementSpacing as well. For example: 
RadImageButtonElement btnimage = new RadImageButtonElement();
btnimage.Image = newImage;
btnimage.Margin = new Padding(0, 15, 0, 15);
btnimage.StretchVertically = false;               
radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.Children.Insert(0, btnimage);

I hope this helps. Should you have any other questions do not hesitate to ask.
 
Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nidal
Top achievements
Rank 1
answered on 30 Apr 2019, 01:54 PM

In my case I set VerticalHeaderAlignment to center .

radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.VerticalHeaderAlignment= RadVerticalAlignment.Center;

my question :

I need only the first element of header (hamburger menu) on top and still fixed without padding change because with padding it's will change with each size , I need it fixed .

 

 

0
Nidal
Top achievements
Rank 1
answered on 30 Apr 2019, 02:55 PM
Also the default header button element take the center and I can't change it's location " fixed location on top" 
0
Dimitar
Telerik team
answered on 01 May 2019, 08:20 AM
Hi Nidal,

If I understand correctly you want the collapse/expand button to be at the top and the other buttons to be centered. This can be achieved by manually arranging the items. I have attached a small sample project that shows this. What I have done is to put the buttons in a StackLayoutElement, this element will be centered later in the ArrangeOverride method. 

Let Me know how this works for you.

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nidal
Top achievements
Rank 1
answered on 01 May 2019, 08:27 AM

Could you send me the attachment of the sample project.

regards .

0
Dimitar
Telerik team
answered on 01 May 2019, 10:51 AM
Hello Nidal,

There was an issue with our system, you should see the attachment at the end of the previous post now. 

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
CollapsiblePanel
Asked by
Arif
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Abbas
Top achievements
Rank 1
Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
Nidal
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or