469,619 Members | 1,869 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,619 developers. It's quick & easy.

Change value cell after click on row in DataGridView

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
May 8 '07 #1
1 3928
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
On Tue, 8 May 2007 11:04:45 +0200, "PawelR" <Pa****@fakeemail.ru>
wrote:
>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
May 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by DraguVaso | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.