I am looking at the ObservableCollection example for the grid.
I modify the code for an example item in ObservableBinding.razor to be like so below such that every 5 seconds CustomerID is updated triggering INotifyPropertyChanged. The CustomerID on the grid does not update in real-time.
Should it ? Or have I misunderstood ?
Paul.
public class ObservableDatas : INotifyPropertyChanged
{
public ObservableDatas() {
DoARun();
}
async void DoARun()
{
try
{
CustomerID = DateTime.UtcNow.ToString("yyyyMMddHHmmssFFF");
}
catch (Exception ex)
{
}
await Task.Delay(5000);
Task.Run(() => { DoARun(); });
}
public int OrderID { get; set; }
private string customerID { get; set; }
public string CustomerID
{
get { return customerID; }
set
{
this.customerID = value;
NotifyPropertyChanged("CustomerID");
}
}