protected void RefreshGrid(ref DataGrid reportGrid) { Config config = Config.getConfig(menu.pathFolderName + "config.json"); ProductTable table = new ProductTable(); Sync sync = new Sync(config.url, menu.idClient, menu.pathFolderName); //sync.UpdatedDataBase(menu.rrfid.m_TagTable, menu.products.items); foreach (UpcInventory item in menu.rrfid.fillUPCsInventory(menu.products)) { table.addRow(item.upc, item.name, item.total.ToString()); } dataView = new DataView(table); reportGrid.DataSource = dataView; reportGrid.TableStyles.Clear(); reportGrid.TableStyles.Add(table.getStyle()); }