0

hi,
i am new to .net.

i m create a datagridview with check box.
i wrote one function for doing some operation.
i like to call that function when i click the datagridview's check box.
if there is any event handler presents to call that function.

please share ur idea...

i think u can understand my problem.

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by thegreatkk
0

some mistake in above one

i used following code for event handler

datagridview.cellcontentclick+=new system.window.form.datagridviewcelleventhandler(functionname);


functionname(object sender, datagridviewcelleventargs e)
{

}

function2(datagridview obj)
{
}


i need to call the function2.....
when user click the check box in my datagridview.......


i call the functionname(). it is working fine.. since it have object and eventargs

but my function2() need to get the current datagridview object.....

(sorry i do't know r u understand my problem or not)........

0

You have object sender in your functionname method. Just cast it to a DataGridView like this (DataGridView)sender and then call function2 with it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.