i am using this code to delete recoeds but it only delete record from datagridview i
also want to delete that record from database. plz help
foreach (DataGridViewRow row in dataGridView1.Rows)
{
foreach (DataGridViewRow item in this.dataGridView1.SelectedRows)
{
dataGridView1.Rows.RemoveAt(item.Index);
}
Loading
Kunal VaishyaPosted Sep 7, 2013, 12:25 AM
First Set Selection mode Property of GridView
SelectionMode = FullRowSelect
After do code like this for deleting selected rows
foreach (DataGridViewRow row in dataGridView1.Rows)
ta muPosted Sep 7, 2013, 2:57 PM
Kunal VaishyaPosted Sep 7, 2013, 7:59 AM
First update into database that records after refresh the grid simple way fill the grid again , its easy to display
ta muPosted Sep 7, 2013, 6:19 AM
how can i do this records are in gridview i want to change value in any cell or more than 1 cell
and click update button the changed vlues are updated to database.
plz