c# async calls UI not responding
<p>This is my requirement:
on button click ,I need to get the data from database and populate in a datagridview, for which i'm using a function. As the retrieval may take a long time and i want to use the ui meanwhile, i want this function to run in a separate thread. 
for this, I'm using async callback. But between begininvoke() and endinvoke() function i'm not writing any code (i dont know what to write to make the ui respond).
The datagridview is getting populated correctly but the ui is blocked when i'm trying to access it when the function is retrieving the data.
Please someone help me.. </p>
