3 Answers, 1 is accepted
so after a lot of search i've managed to add the button to the header by creating a button element and adding that button to children items of the collapsible panel header :
RadButtonElement buttonElement = new RadButtonElement()
{
Text = "Custom Button",
};
this.YourCollapsiblepanelName.CollapsiblePanelElement.HeaderElement.Children.Insert(1, buttonElement);
but theres is an issue with sizing when the button size is set to true it fills the header size
and when i give it a specfic size it creates a button with that size but makes a margin (red line)to fill the header width so haw can i remove this margin and make the header line takes all the rest space
answered by dess
My colleague, Dinko, is out of office today so I will be assisting you with this case. Make sure that the button element is not stretched horizontally. I have prepared a sample code snippet for your reference which result is illustrated below:
public RadForm1()
{
InitializeComponent();
RadButtonElement buttonElement = new RadButtonElement()
{
Text = "Custom Button",
MinSize= new Size(100,20),
MaxSize = new Size(100,20),
StretchHorizontally = false
};
this.radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.Children.Insert(1, buttonElement);
}
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.