handeling click event on a datagrid control in winforms app

P

Peted

Hi

i have a winforms app in vs2008 c#

i have a billingdatagrid on the form, and is shows 4 columns and many
rows of data.

The far left colum shows an arrow to inidcated the currently selected
row.

My problem is

when a user selects a row, then goes into an edit mode the rows
contents are displayed on a seperate panel on the form for
edit/update. while it is in this "edit" mode, i want to prevent the
user from selecting any other rows untill they exit this edit mode.

I cant work out how to do this, i was thinking to test the datagrid
click event and return e.handeled if in edit mode but the e args
passed in dont support the handled property.

Can anyone tell me how to test inside the datagrid click event, to
prevent the row selection being changed by the user, based on a
conditional checking


thanks for any help


Peted
 
J

jake

How about disabling the grid while the row is in edit mode..
grid.Enabled = false;
Just a thought,
jake
 

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