Hi all,
How do I prevent row change in a Datagridview? Is there something like a
BeforeCurrentRowChanged with an eventarg that could prevent from changing
current row?

I'm using datagridview bind with a datatable.

(I think old ADO had an event that could achieve this!)

TIA,
DC

Re: Prevent row change Datagridview by Larry

Larry
Wed Jun 06 13:05:09 CDT 2007

> Hi all,
> How do I prevent row change in a Datagridview? Is there something like a
> BeforeCurrentRowChanged with an eventarg that could prevent from changing
> current row?
>
> I'm using datagridview bind with a datatable.

Did you check these out:

DataGridView.CellValidating
DataGridView.RowValidating

Also see section 4.1 here (written by the "DataGridView" manager at MSFT):

http://www.windowsclient.net/Samples/Go%20To%20Market/DataGridView/DataGridView%20FAQ.doc



Re: Prevent row change Datagridview by cjard

cjard
Thu Jun 07 09:27:05 CDT 2007

On Jun 6, 6:31 pm, "Dinis Correia" <dinis_...@hotmail.com> wrote:
> Hi all,
> How do I prevent row change in a Datagridview?

Make it read only.

> Is there something like a
> BeforeCurrentRowChanged with an eventarg that could prevent from changing
> current row?
Define "Changing the current row" - do you mean edit the row, or alter
which row is current?