Change value cell after click on row in DataGridView

P

PawelR

Hi Group,
In my application I have DataTable which is displayed in DataGridView via
DataView:

DataView myView = new DataView(myTable);
myDataGridView.DataSource = myView;

One column im myTable is boolean (two state - without null value). How can I
change value in this column after click on row in datagridview (one of cells
in rows).
Before sorting this is no problem, but after sort data by user (click in
header of column) row index in datagridview and row index in dataview (and
table) are diferent.

Thx for help

Pawel
 
B

bob

From memory( a very shaky source :0)
the DataGridView CurrentRow property can be indexed into to get to a
particular cell.
Something like
DataGridViewRow r = this.dgv1.CurrentRow;
r[2] = true;
hth
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top