By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,824 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,824 IT Pros & Developers. It's quick & easy.

handeling click event on a datagrid control in winforms app

P: n/a
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
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


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

On Jun 5, 1:00 am, Peted wrote:
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
Jun 27 '08 #2

P: n/a

Thanks i will try that, it never occured to me

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

Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.