Click here to Skip to main content
16,017,650 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i am using a button DELETE to delete the content in the datagrid,it may be single cell or Entire row or entire column,wat i need is i wanted to delete
the data from grid and wanted to reflect in my database , wat can i do

DataBase --- MS-Access.

if i delete here it should reflect in the database.
Tell me immediately please, i am in middle of myproject which need to be submitted tomorrow




Regards,
Rupesh:thumbsup:
Posted

1 solution

hi
i got the answer
here i m enclosing


for (int i = 0; i <= dataGridViewX1.Rows.Count - 1; i++)
{
object o4 = dataGridViewX1.Rows[i].Cells[0].Value;
if (o4 != null)
{
if (o4.ToString() == "True")
{
dataGridViewX1.Rows.RemoveAt(i);
}
}
}


Rupesh
rupesh.prince@gmail.com
 
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