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 are the differences between value types and reference types?
What are winforms in c#?
what is the difference between a struct and a class in c#?
Is there regular expression (regex) support available to c# developers?
What is difference between virtual and override in c#?
How Is The Dll Hell Problem Solved In .net?
What is the use of 'as' Keyword in C# ?
Why is hashset faster?
What is predicate c#?
What is lastindexof c#?
What is an interface class? Give one example of it
What is definition in c#?
what will be the output of the given below coding. using System; public class Exercise { static void OddNumbers(int a) { if (a >= 1) { Console.Write("{0}, ", a); a -= 2; OddNumbers(a); } } public static int Main() { const int Number = 9; Console.WriteLine("Odd Numbers"); OddNumbers(Number); Console.WriteLine(); return 0; } }
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 an actual parameter?