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
Explain the difference between .net and c#?
Describe the overview of clr integration.
What is parallel programming in c#?
How many types of collections are there in c#?
What is null in database?
What does firstordefault mean in c#?
What is difference between for and foreach in c#?
What are the steps for creating clr trigger
If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application?
Explain the difference between passing parameters by value and passing parameters by reference with an example?
What are nested classes in c#?
Differentiate between method overriding from method overloading with its functionality?
Can we use "this" command within a static method?
What do you mean by a windows process in regards to memory allocation?
What is Custom attribute? How to create? If I'm having custom attribute in an assembly, how to say that name in the code?