Hi,
I tried using the code example sended to me, but I have the same problem. Below my code and comment.
The part of code to populate grid:
HistComissaoViewModel _tmpview = new HistComissaoViewModel(pckEmpresas.Items[pckEmpresas.SelectedIndex]);
ObservableCollection<e_Beauty.JSON.HistComissoes> records = _tmpview.HistComissoesList;
dataGrid.ItemsSource = records;
Below my class to get informations from Firebase database using ModelView:
public class HistComissaoViewModel : ObservableObject
{
public string _empresa;
public HistComissaoViewModel(string empresa) : base(listenCultureChanges: true)
{
_empresa = empresa;
LoadData();
}
public ObservableCollection<e_Beauty.JSON.HistComissoes> HistComissoesList { get; set; } = new ObservableCollection<e_Beauty.JSON.HistComissoes>();
protected override void OnCultureChanged(CultureInfo culture)
{
LoadData();
}
private async void LoadData()
{
HistComissoesList.Clear();
HistComissaoDB _db = new HistComissaoDB() { UID = App.UID, Empresa = _empresa };
List<e_Beauty.JSON.HistComissoes> _procedimentos = await _db.GetHistComissaoEmpresaDay();
foreach (var item in _procedimentos)
{
e_Beauty.JSON.HistComissoes _tmp = new e_Beauty.JSON.HistComissoes();
_tmp.Procedimento = item.Procedimento;
_tmp.Estabelecimento = item.Estabelecimento;
_tmp.ValorProcedimento = item.ValorProcedimento;
_tmp.ValorComissao = item.ValorComissao;
_tmp.ValorComissaoGrid = (Double)item.ValorComissao;
HistComissoesList.Add(_tmp);
}
}
}
}
Using the demonstrate code I have the problem again.
When I use the example sended me, the “Table Summary sum" is ok, but the call form is not ModelView. Is a REST call. So, I need your help again, but my modelview is ok when returned informations. I think that problem is in time of Grid component rendering.
Tks a lot.