Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When i delete a row from datagrid it also deleted in database but i have to exit and return to what i deleted it does not done in the mine time,
Posted
Comments
[no name] 16-Aug-14 12:01pm    
You should be using data binding so your grid is updated when your data is updated.
M-osab 16-Aug-14 12:17pm    
what should i whrite ?
Ashi0891 16-Aug-14 12:44pm    
can you explain a little more?
M-osab 16-Aug-14 14:18pm    
I want to see rows that I deleted spontanely

 
Share this answer
 
Comments
M-osab 16-Aug-14 14:28pm    
thanks but it deos not give me any answer
[no name] 16-Aug-14 15:13pm    
Sure it does. You need to go read the articles, do some research, write some code to get an answer. No one going to write this code for you.
I found the solution but winforms not wpf plzz can anyone give the equivalent in wpf :
dataGridView1.Rows.RemoveAt(dataGridView1.SelectedRows[i].Index);
 
Share this answer
 
finaly I found solution to this problem :

((DataRowView)(dataGrid1.SelectedItem)).Row.Delete();
 
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