public void UpdateDataGrid(bool newInsert = false)
{
//ThreadSafe (updating datagridview from AddEventForm is not allowed otherwise
if (InvokeRequired)
{
Invoke(new Action(UpdateDataGrid));
}
else
{
Util.PopulateDataGridView(ref this.EventsDataGridView,newInsert);
}
}
I don't know how to provide the optional parameter to new Action().
I tried new Action(UpdateDataGrid) but still throws a runtime error.
Thanks