how to change a value of particular cell in a data grid

Answer Posted / amit kumar sharma

private void dataGridView1_CellClick(object sender,
DataGridViewCellEventArgs e)
{
//Edit cell value
this.dataGridView1[e.ColumnIndex,
e.RowIndex].Value="Any Thing";

//find column name of cell
string strCulumnName = dataGridView1
[e.ColumnIndex, e.RowIndex].OwningColumn.Name;
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a .exe extension files? How is it similar to .dll extension files?

576


What are extender provider components? Explain how to use an extender provider in the project.

502


How can you use abstract class and interface?

541


Explain the accessibility modifier protected internal?

462


What is the use of delegates in c#?

479






What is the difference between ref & out parameters in c#?

460


Explain About Web.config

561


What are events in C#?

559


Why do we use void in c#?

474


What is type checking in c#?

512


How to use delegates with events?

553


Why do we need a singleton class?

506


Is c# a keyword?

494


Write the difference between TypeOf and GetType?

590


What is difference between === and ==?

468