1
Answer

Data grid view event

Wiryono Lauw

Wiryono Lauw

14y
1.7k
1
Hi All

I need to create app and mostly to do with data and of course using datagridview

I develop using C# with WinForm

No there is a lot of occasion when using datagridview that you need to click on one cell than it return an information such as opening in new form or perhaps pass the data to other class etc.

The event will be using the DataGridViewCellEventArgs like this

void dgCellContentClick(object sender, DataGridViewCellEventArgs e) {
    //put all the function on click here
}

Now it works it works but it super slow
all the event inside above function is call after 5-6 second after I click the cell sometime i need to change click the other cell before it works out.

I put a simple event to return the rowindex I selected  like this

MessageBox.Show(e.RowIndex.toString()) ---- see how simple is this

but it slow

My datagrid only have 10 rows in it.

Is it a problem in the dataset or other else ?

Answers (1)