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.

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)........

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

hi boss it working fine thank u.....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.