Click here to Skip to main content
14,981,532 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to disable the click and others events of datagridview temporary when i click add new record button and it enable when new record is saved.

Any tell me how to do this??

Thanks in advance
Updated 28-Jun-13 23:46pm

1 solution

You can done it as:

Declare a public variable as
public int flag=0;

Then in your Add new button click event

in Your grid view events
  //do your event click stuff here

Then set flag=0 after new record is saved

If if this seems your answer kind to inform me..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900