C
Cralis
I have run a query to populate a listview from a table.
Works fine.
I then add a new row to the table, and want to refresh the list view,
so I rerun my 'PopulateView' procedure I have created. But no new rows
appear!
I check the database, and the new row is there.
I close my app, reopen, and hey presto, the row appears.
Why am I unable to refresh the grid?
Code:
private void PopulateList()
{
lvModels.Items.Clear();
List<IModel> models =
ModelParts.classes.clsDOModels.getListOfModels(true);
for (int i = 0; i < models.Count; i++)
{
lvModels.Items.Add(models.description.ToString());
}
}
Works fine.
I then add a new row to the table, and want to refresh the list view,
so I rerun my 'PopulateView' procedure I have created. But no new rows
appear!
I check the database, and the new row is there.
I close my app, reopen, and hey presto, the row appears.
Why am I unable to refresh the grid?
Code:
private void PopulateList()
{
lvModels.Items.Clear();
List<IModel> models =
ModelParts.classes.clsDOModels.getListOfModels(true);
for (int i = 0; i < models.Count; i++)
{
lvModels.Items.Add(models.description.ToString());
}
}