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 are the differences between value types and reference types?

545


What are winforms in c#?

493


what is the difference between a struct and a class in c#?

560


Is there regular expression (regex) support available to c# developers?

520


What is difference between virtual and override in c#?

456






How Is The Dll Hell Problem Solved In .net?

591


What is the use of 'as' Keyword in C# ?

574


Why is hashset faster?

484


What is predicate c#?

538


What is lastindexof c#?

480


What is an interface class? Give one example of it

475


What is definition in c#?

472


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; } }

3292


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?

572


What is an actual parameter?

487