Hi,
I try to get GridComboBoxColum to work but without success. I get succssfull data from database in
ObservableCollection. This one is binded in XAML but ComboBox is empty. I think i have read each thread in forum, but i don't get work.
I search for example to get work ComboBox from Database in Grid.
Thanks !
Greetings Ljuban
Model.cs:
public string PLANEINHEIT
{
get => _planEinheit;
set { _planEinheit = value; RaisePropertyChanged("PLANEINHEIT"); }
}
ModelView:
PlaneinheitList = new ObservableCollection<PlaneinheitModel>();
//DataTable was fill from Database
if (_dtPlanEinheit.Rows.Count > 0)
{
foreach (DataRow dr in _dtPlanEinheit.Rows)
{
PlaneinheitList.Add(new PlaneinheitModel() { PLANEINHEIT = dr[0].ToString().Trim() });
}
}
main.xaml
<syncfusion:GridComboBoxColumn
Width="100"
AllowEditing="True"
ItemsSource="{Binding PlaneinheitList}"
AllowSorting="True"
ColumnSizer="Star"
HeaderText="Planeinheit"
ImmediateUpdateColumnFilter="True"
MappingName="PLANEINHEIT" />