5 Answers, 1 is accepted
0
                                
                                                    Emanuel Varga
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 29 Apr 2011, 03:00 PM
                                            
                                        Hello Oren,
Just create a custom control, dock other controls to the top + bottom, and dock the dropdownlist to fill.
Something like this:
 
 
 
 
 
 
 
 
 
 
 
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
                                        Just create a custom control, dock other controls to the top + bottom, and dock the dropdownlist to fill.
Something like this:
using System.ComponentModel;using System.Windows.Forms;using Telerik.WinControls;using Telerik.WinControls.UI;public partial class Form1 : Form{    public Form1()    {        InitializeComponent();        var customDropDownList = new CustomDropDownList();        var label = new RadLabel();        label.Text = "Header";        customDropDownList.HeaderControl = label;        label = new RadLabel();        label.Text = "Footer";        customDropDownList.FooterControl = label;        this.Controls.Add(customDropDownList);        customDropDownList.Dock = DockStyle.Fill;    }}[ToolboxItem(true)]public class CustomDropDownList : RadControl{    private Control headerControl;    private Control footerControl;    private RadDropDownList customDropDownList;    public CustomDropDownList()    {        customDropDownList = new RadDropDownList();        this.Controls.Add(customDropDownList);        customDropDownList.Dock = DockStyle.Fill;    }    public Control HeaderControl    {        get { return headerControl; }        set        {            if (headerControl != value)            {                CleanupControl(headerControl);                headerControl = value;                OnControlChanged(headerControl, true);            }        }    }    public Control FooterControl    {        get { return footerControl; }        set        {            if (footerControl != value)            {                CleanupControl(footerControl);                footerControl = value;                OnControlChanged(footerControl, false);            }        }    }    private void OnControlChanged(Control control, bool header)    {        this.Controls.Add(control);        control.Dock = header ? DockStyle.Top : DockStyle.Bottom;        this.Controls.SetChildIndex(control, header ? 1 : 2);    }    private void CleanupControl(Control control)    {        if (control == null)        {            return;        }        this.Controls.Remove(control);        control.Dispose();        control = null;    }}Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
0
                                Hi all,
Emanuel, thank you for your suggestion.
Oren, please check the help article suggested by Emanuel. It describes how to create a custom control.
Please do not hesitate to contact us if you have further questions.
Greetings,
Peter
the Telerik team
                                        Emanuel, thank you for your suggestion.
Oren, please check the help article suggested by Emanuel. It describes how to create a custom control.
Please do not hesitate to contact us if you have further questions.
Greetings,
Peter
the Telerik team
0
                                
                                                    Oren
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 16 May 2011, 03:50 PM
                                            
                                        Hi,
I just copied and run the suggested code and i didn't get the desire behaviour.(see image attached),
My request is to build a custom control from RadDropDownList (to inherite RadDropDownList ),
and to add header/footer with buttons (asp buttons) that could be functionality.
The main idea is to add radtreeview inside the dropdown exactly like i did in asp.net ajax.
Please see the attached images and help me to mimic the custom server control i did in asp.net ajax.
I use Telerik Controls Q1 2011
Thank's
Oren
                                        I just copied and run the suggested code and i didn't get the desire behaviour.(see image attached),
My request is to build a custom control from RadDropDownList (to inherite RadDropDownList ),
and to add header/footer with buttons (asp buttons) that could be functionality.
The main idea is to add radtreeview inside the dropdown exactly like i did in asp.net ajax.
Please see the attached images and help me to mimic the custom server control i did in asp.net ajax.
I use Telerik Controls Q1 2011
Thank's
Oren
0
                                
                                                    Emanuel Varga
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 16 May 2011, 03:56 PM
                                            
                                        Hello again Oren,
This is a totally different thing, and i would suggest again a different approach.
I would just suggest using a splitButton for this, for the look and feel with that down arrow, and then creating your own custom form which you will be showing when the user clicks on that button, simulating a dropdown but doing something totally different, and then you can create that form however you would like.
I hope you understood what i'm trying to say here.
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
                                        This is a totally different thing, and i would suggest again a different approach.
I would just suggest using a splitButton for this, for the look and feel with that down arrow, and then creating your own custom form which you will be showing when the user clicks on that button, simulating a dropdown but doing something totally different, and then you can create that form however you would like.
I hope you understood what i'm trying to say here.
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
0
                                Hi all,
Emanuel, thank you very much for your suggestion.
Oren, please refer to the attached sample project. I hope it illustrates the desired behavior. In case you have further queries, do not hesitate to contact us.
Regards,
Boryana
the Telerik team
                                        Emanuel, thank you very much for your suggestion.
Oren, please refer to the attached sample project. I hope it illustrates the desired behavior. In case you have further queries, do not hesitate to contact us.
Regards,
Boryana
the Telerik team