We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfMultiColumnDropDownControl Configuration

Thread ID:

Created:

Updated:

Platform:

Replies:

147315 Sep 5,2019 05:31 PM UTC Sep 9,2019 08:53 AM UTC WPF 3
loading
Tags: SfMultiColumnDropDownControl
Tech Shop
Asked On September 5, 2019 05:31 PM UTC

Hello good afternoon.

I have questions about some component-specific settings.

How to set the SfMultiColumnDropDownControl component popup to fit the content. That is, it does not allow item list data to be hidden. Preferably for long text items it is on two or more lines.

Susmitha Sundar [Syncfusion]
Replied On September 6, 2019 01:36 PM UTC

Hi Tech, 
 
Thank you for using Syncfusion controls. 
 
Your requirement can be achieved by SfMultiColumnDropDownControl.Columns TextWrapping property. If you set the TextWrapping property as Wrap. Popup list content text will be Wrap to next line. And you need to set the height for the DropDownGrid for multiple lines. Please refer the below code snippet, 
Xaml: 
<syncfusion:SfMultiColumnDropDownControl x:Name="sfMultiColumn"  
                                                 ItemsSource="{Binding Orders,IsAsync=True}"  
                                                 DisplayMember="OrderID"  
                                                 Width="175" 
                                                 Height="30" 
                                                 PopupOpened="SfMultiColumn_PopupOpened" 
                                                 SelectedIndex="2"> 
            <syncfusion:SfMultiColumnDropDownControl.Columns> 
                <syncfusion:GridTextColumn MappingName="OrderID" /> 
                <syncfusion:GridTextColumn MappingName="CustomerName"  /> 
                <syncfusion:GridTextColumn MappingName="Country" TextWrapping="Wrap" /> 
            </syncfusion:SfMultiColumnDropDownControl.Columns> 
        </syncfusion:SfMultiColumnDropDownControl> 
 
C#: 
  //Variables 
  SfDataGrid grid; 
  GridRowSizingOptions gridRowResizingOptions = new GridRowSizingOptions(); 
  double autoHeight; 
 
     private void SfMultiColumn_PopupOpened(object sender, PopupOpenedEventArgs e) 
   { 
        grid = this.sfMultiColumn.GetDropDownGrid(); 
        grid.QueryRowHeight += Grid_QueryRowHeight; 
   } 
 
   private void Grid_QueryRowHeight(object sender, QueryRowHeightEventArgs e) 
   { 
       if (this.grid.GridColumnSizer.GetAutoRowHeight(e.RowIndex, gridRowResizingOptions, out autoHeight)) 
       { 
           if (autoHeight > 24) 
           { 
               e.Height = autoHeight; 
               e.Handled = true; 
           } 
       } 
   } 
 
 
Please contact us for further assistance. 
 
Regards, 
Susmitha S 


Tech Shop
Replied On September 6, 2019 05:18 PM UTC

My version is 17.1.0.47, some properties do not appear to me. What version are you in?

Susmitha Sundar [Syncfusion]
Replied On September 9, 2019 08:53 AM UTC

Hi Tech,   
Thanks for the update.   
We have checked the provided sample in 17.1.0.47 version and it works fine in our end. Please refer the below sample.    
 Could you please provide us more information about, which properties do not appear in your sample? It will be helpful for us to investigate further.     
Regards,   
Susmitha S   


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon