views:

2277

answers:

1

Hi

I am using Datagridview contyrol for populating the data. I need to enable some data and disable some data based on some values dynamically !!

Can anyone tell me the code to do it ?

+1  A: 

You can set a particular row or cell to be read-only, so the user cannot change the value. Is that what you mean?

dataGridView1.Rows[0].ReadOnly = true;
dataGridView1.Rows[1].Cells[2].ReadOnly = true;
Blorgbeard