You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1418,6 +1424,166 @@ The `DataGridNumericColumn` allows formatting the numeric data with culture-spec
1418
1424
1419
1425
*`NullValue` - To set the null value when the numeric cell value is null, use the [DataGridNumericColumn.NullValue](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridNumericColumn.html#Syncfusion_Maui_DataGrid_DataGridNumericColumn_NullValue) property.
1420
1426
1427
+
## DataGridMultiColumnComboBoxColumn
1428
+
1429
+
The `DataGridMultiColumnComboBoxColumn` displays enumeration as cell contents and hosts a (SfMultiColumnComboBox)[] in editing mode. This column type allows you to define the predefined columns in its drop-down, similar to SfDataGrid.
1430
+
1431
+
You can change the value by selecting the item from drop down or by editing the entry in `SfMultiColumnComboBox`. To disable text editing, set the (IsTextReadOnly)[] property to `true`.
var column = new DataGridMultiColumnComboBoxColumn()
1460
+
{
1461
+
MappingName = "CustomerID",
1462
+
HeaderText = "Customer ID",
1463
+
ValueMember = "CustomerID",
1464
+
DisplayMember = "CustomerID",
1465
+
ItemsSource = viewModel.OrderDetails,
1466
+
AutoGenerateColumns = false,
1467
+
Columns = new ColumnCollection()
1468
+
{
1469
+
new DataGridTextColumn() { MappingName = "CustomerID" },
1470
+
new DataGridNumericColumn() { MappingName = "ProductID" }
1471
+
}
1472
+
};
1473
+
this.dataGrid.Columns.Add(column);
1474
+
1475
+
{% endhighlight %}
1476
+
1477
+
{% endtabs %}
1478
+
1479
+
SfDataGrid triggers, (CurrentCellDropDownSelectionChanged)[] event, when the SelectedValue is changed. (CurrentCellDropDownSelectionChangedEventArgs)[] of `CurrentCellDropDownSelectionChanged` event provides the information about the changed cell value.
1480
+
1481
+
`SelectedIndex` property returns the index of selected item.
1482
+
`SelectedItem` property returns the selected item from drop down list.
You can enable the `SfMultiColumnComboBox` to automatically complete the entered input value by setting the (AllowAutoComplete)[] property to `true`. When enabled, this property compares the entered text with each item in the underlying data source of `DataGridMultiColumnComboBoxColumn` and autocomplete the input with the matched value based on the DisplayMember.
1489
+
1490
+
### Filtering
1491
+
1492
+
You can enable the `SfMultiColumnComboBox` to dynamically filter the drop-down list items based on the text typed in the entry by setting (AllowIncrementalFiltering)[] property to `true`. Additionally, `DataGridMultiColumnComboBoxColumn` allows filtering based on case sensitivity by setting (AllowCaseSensitiveFiltering)[] to `true`. These features help users to quickly select items from large list.
1493
+
1494
+
<imgalt="DataGridMultiColumnComboBox column with Filtering .NET MAUI DataGrid"src="Images\column-types\maui-datagrid-MultiColumn-ComboBox-column-filtering.png"width="404"/>
1495
+
1496
+
### Null value support
1497
+
1498
+
You can allow null values in the column by setting the (AllowNullValue)[] property to `true`.
1499
+
1500
+
N>
1501
+
The AllowNullValue will work only when the underlying property type is Nullable.
1502
+
1503
+
### Popup Size Customization
1504
+
1505
+
You can change the size of drop-down popup by setting (PopupWidth)[] and (PopupHeight)[] properties. If these values are not set, the popup width defaults to the `PopupMinWidth` property, which is 200.0 by default. Similarly, the popup height defaults to the `PopupMinHeight` property, which is 300.0 by default.
1506
+
1507
+
Additionally, `SfMultiColumnComboBox` can automatically adjust the popup width based on the actual size of the SfDataGrid by setting the (IsAutoPopupSize)[] property to `true`.
1508
+
1509
+
### Loading different ItemsSource for each row
1510
+
1511
+
You can load different ItemsSource to each row of `DataGridMultiColumnComboBoxColumn` by setting the `SfDataGrid.ItemsSourceSelector` property.
1512
+
1513
+
### Implementing IItemsSourceSelector
1514
+
1515
+
`ItemsSourceSelector` must implement the `IItemsSourceSelector` interface, which requires the implementation of the `GetItemsSource` method. The `GetItemsSource` method receives the following parameters:
1516
+
1517
+
***Record** – The data object associated with row.
1518
+
***Data Context** – The data context of data grid.
1519
+
1520
+
In the following example, the items source for `ShipCity` column is returned based on the value of the `ShipCountry` column, using the record and data context passed to the `GetItemsSource` method.
viewModel.ShipCityItemsSources.TryGetValue(countryName, out shipCities);
1570
+
return shipCities.ToList();
1571
+
}
1572
+
1573
+
return null;
1574
+
}
1575
+
}
1576
+
1577
+
{% endhighlight %}
1578
+
1579
+
{% endtabs %}
1580
+
1581
+
<imgalt="DataGridMultiColumnComboBox column with ItemsSourceSelector .NET MAUI DataGrid"src="Images\column-types\maui-datagrid-MultiColumn-ComboBox-column-itemsourceselector.png"width="404"/>
1582
+
1583
+
<imgalt="DataGridMultiColumnComboBox column with ItemsSourceSelector .NET MAUI DataGrid"src="Images\column-types\maui-datagrid-MultiColumn-ComboBox-column-itemsourceselector2.png"width="404"/>
1584
+
1585
+
You can download the sample from the following link: (Sample)[https://github.com/SyncfusionExamples/How-to-load-different-items-for-each-row-in-MultiColumn-ComboBox-Column-in-.NET-MAUI-SfDataGrid].
1586
+
1421
1587
## Row header
1422
1588
1423
1589
The row header is a type of column that is placed as the first cell of each row and remains frozen. To enable the row header, set [SfDataGrid.ShowRowHeader](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_ShowRowHeader) to `true` Additionally, the `SfDataGrid` allows you to customize the row header width using the [SfDataGrid.RowHeaderWidth](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_RowHeaderWidth) property. The default value is `30.`
0 commit comments