Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
35
UltraGrid Combobox dropdown button filling entire height of expanded row
posted

When I expand the row height, the combobox fills the row as in the attached picture, how can I force the combo box to remain the same size docked to the top?

I have tried the following

customCombo = new Infragistics.Win.UltraWinEditors.UltraComboEditor();

customCombo.Appearance.ImageVAlign = VAlign.Middle;

           

customCombo.AlwaysInEditMode = true;

customCombo.Dock = DockStyle.Top;

ultraGrid1.DisplayLayout.Bands[1].Columns["Custom RAG"].EditorControl = this.customCombo;

ultraGrid1.DisplayLayout.Bands[1].Columns["Custom RAG"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;

ultraGrid1.DisplayLayout.Bands[1].Columns["Custom RAG"].AutoSizeMode = ColumnAutoSizeMode.None;

ultraGrid1.DisplayLayout.Bands[1].Columns["Custom RAG"].CellMultiLine = DefaultableBoolean.False;

 

 

 

I have tried various Dock and anchor options, but no luck

Any suggestions

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    This is actually one of the simplest CreationFilters you can do. :)


        public class MyCreationFilter : IUIElementCreationFilter
        {
            #region IUIElementCreationFilter Members

            void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent)
            {
                if (parent is DropDownButtonUIElement)
                {
                    parent.Rect = new Rectangle(
                        parent.Rect.X,
                        parent.Rect.Y,
                        parent.Rect.Width,
                        parent.Rect.Width
                        );
                }
            }

            bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent)
            {
                return false;
            }

            #endregion
        }

     

    Notice that I used the Width of the element for the height and the width.

Children