Click here to Skip to main content
15,886,030 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i have database connected with entity framework and see data in listview ...
now i want select row in listview1 and press button delete ..
i want delete selected row in listview1 and Table ..
sorry for bad english
Posted

1 solution

Though your question is not clear, I guess you are trying to delete the selected row from database !!!! Its straight forward in a delete button clicked event get the unique key or primary key of the selected row and sent to deleterecord() function:

C#
deleteRecord(int uniqueKey)
{

//your delete code here 

 ... where table.id==uniqueKey

}
 
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