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

force radcombobox to always expand upwards

6 Answers 94 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
Delvis
Top achievements
Rank 1
Delvis asked on 24 Apr 2013, 02:03 PM
Hello, 

I need to open RadMulticolumnCombobox in upwards direction. I am using Telerik for WinForm.

Otherwise, he would wish that while one types to filter this do not open up (AutoFilter = true)

Any idea?

6 Answers, 1 is accepted

Sort by
0
Accepted
Paul
Telerik team
answered on 29 Apr 2013, 11:41 AM
Hello Delvis,

Thank you for writing.

To set the location of the popup window you can subscribe to the PopupOpening event and use the CustomLocation property. Here is a small code snippet which will give you the basic idea.
void MultiColumnPopupForm_PopupOpening(object sender, CancelEventArgs args)
        {
            Point mccbScreenLocation = this.PointToScreen(radMultiColumnComboBox1.Location);
            mccbScreenLocation.Y = mccbScreenLocation.Y - radMultiColumnComboBox1.MultiColumnComboBoxElement.MultiColumnPopupForm.Height;
            ((RadPopupOpeningEventArgs)args).CustomLocation = mccbScreenLocation;
        }

I am also attaching a sample project to show you everything in action.

Hope that helps.

Greetings,
Nikolay Aleksiev
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
0
Delvis
Top achievements
Rank 1
answered on 30 Apr 2013, 04:26 AM
Hi Nikolay Aleksiev, that's just what I need, thank you very much.
0
Delvis
Top achievements
Rank 1
answered on 01 May 2013, 04:50 AM
Hello Nikolay,

The supplied solution solves my problem in part because I need to adjust the position on filter.

I have the following properties:

AutoFilter = true

AutoSizeDropDownToBestFit = true

AutoSizeDropDownHeight = true

or not showing the popup on filter, only on demand

Excuse my English

Thank you very much for answering
0
Paul
Telerik team
answered on 03 May 2013, 01:38 PM
Hi Delvis,

Thank you for writing back.

I am not sure that I understand that precise scenario you are after. Could you please elaborate on it so I can understand what is the exact requirement and help you achieve it if possible?

Kind regards,
Nikolay Aleksiev
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
0
Delvis
Top achievements
Rank 1
answered on 05 May 2013, 02:19 AM
Hello Nikolay,

Thank you for your answer.

In the example supplied, if we add a FilterDescriptor:

var filterDescriptor1 = new Telerik.WinControls.Data.FilterDescriptor { PropertyName = "ContactName" };

radMultiColumnComboBox1.EditorControl.MasterTemplate.FilterDescriptors.Add(filterDescriptor1);


We obtain a non-desired effect when we type. Attachment images.

I need to keep on adjusting the new position while filter.

Thanked,

Delvis
0
Paul
Telerik team
answered on 08 May 2013, 01:34 PM
Hi Delvis,

Thank you for the screenshots and the explanation.

You have no choice but to adjust the popup form location every time it changes its size. For this purpose you will have to subscribe for the following event:
radMultiColumnComboBox1.MultiColumnComboBoxElement.EditorControl.FilterChanged += EditorControl_FilterChanged;

This should do the work. I am attaching a sample project to show you everything in action.

Hope you will find it helpful.

Regards,
Paul
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Tags
MultiColumn ComboBox
Asked by
Delvis
Top achievements
Rank 1
Answers by
Paul
Telerik team
Delvis
Top achievements
Rank 1
Share this question
or