how to change a value of particular cell in a data grid

Answers were Sorted based on User's Feedback



how to change a value of particular cell in a data grid..

Answer / 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

how to change a value of particular cell in a data grid..

Answer / ajaujan

e.Item.Cells[i].Text="Something"

Is This Answer Correct ?    0 Yes 0 No

how to change a value of particular cell in a data grid..

Answer / vijay saxena

GridView1.Rows[2].Cells[1].Text = "something";

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C Sharp Interview Questions

3. Describe the process of interact UI to BAL n DAL?

2 Answers   Mphasis,


Explain the difference between abstract class and interface.

0 Answers   Accenture,


What exactly is serverless?

0 Answers  


Name some properties of thread class.

0 Answers  


What statements can enclose a "continue" statement?

3 Answers   Fortech,






How Reflection is used and what it's significance ?

0 Answers   HCL,


What is whitespace in c#?

0 Answers  


Oops concepts ?

2 Answers   Accenture, Digital GlobalSoft,


What is session and cookies in c#?

0 Answers  


What is view model in c#?

0 Answers  


List the 5 different access modifiers in c#?

0 Answers  


What is the difference between an application domain and a process?

0 Answers  


Categories