force radcombobox to always expand upwards

7 posts, 1 answers
  1. Delvis
    Delvis avatar
    18 posts
    Member since:
    Mar 2012

    Posted 24 Apr 2013 Link to this post

    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?

  2. Answer
    Paul
    Admin
    Paul avatar
    60 posts

    Posted 29 Apr 2013 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Delvis
    Delvis avatar
    18 posts
    Member since:
    Mar 2012

    Posted 29 Apr 2013 Link to this post

    Hi Nikolay Aleksiev, that's just what I need, thank you very much.
  5. Delvis
    Delvis avatar
    18 posts
    Member since:
    Mar 2012

    Posted 30 Apr 2013 Link to this post

    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
  6. Paul
    Admin
    Paul avatar
    60 posts

    Posted 03 May 2013 Link to this post

    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.
  7. Delvis
    Delvis avatar
    18 posts
    Member since:
    Mar 2012

    Posted 04 May 2013 Link to this post

    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
  8. Paul
    Admin
    Paul avatar
    60 posts

    Posted 08 May 2013 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready