.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

Restrict Delete rows

Posted By: Santosh     Posted Date: October 01, 2010    Points:2   Category :Windows Application
Hi All

can any body plz tell me how to restrict to delete the record in "Delete" key press.
i m working in windows application ,i have a datagridview and i have added some rows ,when ever i am clicking the "Delete" key it shouldn't delete any rows.

it's very urgent.........


Author: Deco             
Posted Date: October 01, 2010     Points: 5   

Then what is the meaning of having a delete key, simply remove it from the Grid.

Author: Akhil Raj       [Moderator]      
Posted Date: October 02, 2010     Points: 5   

i dint get your qustin. If you dont want to allow delete in the gridview. Just change the property ' AllowUserToDeleteRow' to false

Author: Santosh             
Posted Date: October 03, 2010     Points: 5   

Sorry, i think "clicking" word made you confusion.....

actually that should be "pressing key"

means when ever i pressing the "Delete" key from key board the rows shouldn't not delete from gridview.


Author: Dhilip.R             
Posted Date: November 19, 2010     Points: 5   


You should follow this option

Select the GridView Properties --> Set false on the property of AllowUserToDelete

Thanks & Regards

Author: krishana singh             
Posted Date: December 11, 2010     Points: 5   

Restrict Delete rows

1. drag control on form then show the task of datagriview in which unchecked enable deleting...

Author: Narayanan             
Posted Date: September 07, 2011     Points: 20   

just count your delete record and to disable the delete key.
For Example :If you want to delete only 10 records in the Datagridview. just count the pressing of delete key.and give a condition. It's an idea.
Lakshmi Narayanan.S

Regards, Lakshmi Naraayanan.S

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend