Click here to Skip to main content
16,013,516 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
Posted
Updated 28-Jun-13 23:46pm
v2

1 solution

You can done it as:

Declare a public variable as
public int flag=0;

Then in your Add new button click event
C#
{
 flag=1;
}

in Your grid view events
C#
{
if(flag!=1)
{
  //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..
 
Share this answer
 

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