I used LINQ to load a float array from DB. Even though I succeeded in loading the array, I cannot make a DataGridView to show that array.
Here is my code
float[] balances = client.LoadBalance(id);
// LoadBalance() give me an array of floats of customer who has the specified id
dataBalance.DataSource = balances;
I tried the following, yet they are not helping
dataBalance.Refresh();
dataBalance.Parent.Refresh();
and
dataBalance.DataSource = null;
dataBalance.DataSource = balances;
I added a breakpoint after float[] balances = client.LoadBalance(id);
and I am sure that the LoadBalance(id)
works.
Please help!