How to Raise event before and after loading data to datagridview when virtual mode on

  • Thread starter Thread starter Mou_kolkata
  • Start date Start date
M

Mou_kolkata

Guest
My datagridview virtual mode is turned on.so i have to populate grid this way

private void dataGridView1_CellValueNeeded(object sender,DataGridViewCellValueEventArgs e)
{
e.Value = memoryCache.RetrieveElement(e.RowIndex, e.ColumnIndex);
}

from these thread

http://stackoverflow.com/questions/13856869/notify-when-event-from-another-class-is-triggered
http://stackoverflow.com/questions/4378339/raise-an-event-of-a-class-from-a-different-class-in-c-sharp

i got the logic how to raise event to calling environment.

i am in confusion from where to raise event in my code. apologized that i could not submit my full code but here i am mentioning a url where i post my full working code. please have a look and guide me how to raise event from my code.

so this is the url where i post my full working code

http://stackoverflow.com/questions/31458197/
how-to-sort-datagridview-data-when-virtual-mode-enable/31475803#31475803
My Objective


i want to raise a event when data load will start and again want to raise another event after populating all rows of the grid.

my Event handler code would look like

public void BeginDataLoad(object sender, EventArgs e)
{
//Do something here
}

public void EndDataLoad(object sender, EventArgs e)
{
//Do something here
}

looking for help with code sample. thanks

Continue reading...
 
Back
Top