Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
151009 | Jan 28,2020 06:49 AM UTC | Mar 17,2020 11:36 AM UTC | WPF | 10 |
![]() |
Tags: SfDataGrid |
sfdatagrid.CellRenderers.Remove("MultiColumnDropDown");
sfdatagrid.CellRenderers.Add("MultiColumnDropDown", new GridCellMultiColumnDropDownRendererExt());
public class GridCellMultiColumnDropDownRendererExt : GridCellMultiColumnDropDownRenderer
{
public GridCellMultiColumnDropDownRendererExt()
{
this.IsDropDownable = true;
this.AllowRecycle = false;
}
} |
public class ItemsSourceSelector : IItemsSourceSelector
{
public IEnumerable GetItemsSource(object record, object dataContext)
{
if (record == null)
return null;
var orderinfo = record as OrderDetails;
var countryName = orderinfo.ShipCountry;
var viewModel = dataContext as ViewModel;
//Returns ShipCity collection based on ShipCountry.
if (viewModel.ShipCities.ContainsKey(countryName))
{
ObservableCollection<ShipCityDetails> shipCities = null;
viewModel.ShipCities.TryGetValue(countryName, out shipCities);
return shipCities;
}
return null;
}
} |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.