SfMultiColumnDropDownControl Configuration
Hello good afternoon.
I have questions about some component-specific settings.
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.
SIGN IN To post a reply.
3 Replies
SS
Susmitha Sundar
Syncfusion Team
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;
}
}
} |
Sample link: https://www.syncfusion.com/downloads/support/forum/147315/ze/MultiColumnDropDown_TextWrapping133670835
Please contact us for further assistance.
Regards,
Susmitha S
TS
Tech Shop
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?
SS
Susmitha Sundar
Syncfusion Team
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.
Sample link: https://www.syncfusion.com/downloads/support/forum/147315/ze/MultiColumnDropDown_TextWrapping852371826
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
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
TS Tech Shop
- Sep 5, 2019 05:31 PM UTC
- Sep 9, 2019 08:53 AM UTC