Hi Every One I have tried to reload the datagridview rows at every time i click the button. but the problem is we can't reload the datagridview in windows forms like gridview in asp in asp for every button click event the page will be reloaded so the grid will updated with values but in windows forms it will not happen so we have to clear for clear we can't use
datagridview1.Rows.Clear()
it will raise the error so, i search for solutions in many websites but i can't get it at that time i got this below idea using this we can remove our rows in grid and we can rebind it with our new values
if (datagridview1.RowCount > 0)
{
for (int i = 0; i <= datagridview1.RowCount; i++)
{
datagridview1
.Rows.RemoveAt(0);
}
}