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
How do you serialize in c#?
How do I link two windows forms in c#?
How to rotate an Image in C#?
Are multiple data types stored in System.Array?
What's the difference between a static method and a non static method c#?
What are the differences between a class and a struct?
What are boxing and unboxing?
What is delegates and events?
How to add a readonly property in c#.net
Difference between value and reference type. What are value types and reference types?
Define sealed classes in c#?
Is versioning applicable to private assemblies?
Why do we need interfaces in c#?
What is the difference between “out” and “ref” parameters in c#?
What is static classes in c#?