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
What is super class in c#?
What is a generic in c#?
Does unity use c++ or c#?
How does c# achieve polymorphism?
What is the difference between selection and projection?
Can arraylist hold primitive types?
What is difference between private and static constructor?
Why delegates are required?
What are the benefits of using generics in c#?
How main method is called in c#?
What are annotations in c#?
What is the root element of an xml file?
Suppose two interfaces have same method, so how will you implement these methods in derive class?
Why is ienumerable used?
Why do we need events in c#?