how to change a value of particular cell in a data grid
Answers were Sorted based on User's Feedback
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 |
Answer / vijay saxena
GridView1.Rows[2].Cells[1].Text = "something";
Is This Answer Correct ? | 2 Yes | 2 No |
How long will it take to learn c sharp?
Can we inherit private members of class in c#?
how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.
What is the difference between “dispose” and “finalize” variables in c#?
Define mutex in C#?
Give examples for value types?
can you allow a class to be inherited, but prevent the method from being over-ridden?
I was trying to use an out int parameter in one of my functions. How should I declare the variable that I am passing to it?
What is msil in c#?
Is c# the same as d flat?
Is ram a heap?
What are methods in C#?