i have a GUI problem when i assign datatable as datasource on formload, then onlick button i populate datatabel and its rows shown in grid view but GUI issue is that as shown in image row appear in graphical format only when i change the position of form of click on grid header or move row then all row appears other wise they are not shown see code
on load form
private void WebScrapingApp_Load(object sender, EventArgs e)
{ datatable1.Columns.Add("catagory", typeof(System.String));
datatable1.Columns.Add("PageNo", typeof(System.String));
datatable1.Columns.Add("Name", typeof(System.String));
datatable1.Columns.Add("price", typeof(System.String));
datatable1.Columns.Add("Time", typeof(System.String));
datatable1.Columns.Add("Location", typeof(System.String));
dataGridView2.DataSource = datatable1;
this.dataGridView2.Update();
}
then onlclick call a fucntion that have loop to ADD rows
for (int i = 3; i <= 41; i++)
{
try
{
datatable1.Rows.Add(s, pageIndex.ToString(), tmpNames, tmpLocations, tmtimes, tmprices);
this.dataGridView2.Update();
datatable1.AcceptChanges();
}
}
PROBLEM: as shown in image populated data become visible on click of header row, as first coloumn is still invisible in grid when you click its header it will appear
IMAGE FOR GRAPHICS IS BELOW LINK