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 VaishyaRank #990 · 2K reputationPosted Sep 6, 2013, 8:25 PM EDT
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 mu198 reputationPosted Sep 7, 2013, 2:19 AM EDT
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
Kunal VaishyaRank #990 · 2K reputationPosted Sep 7, 2013, 3:59 AM EDT
First update into database that records after refresh the grid simple way fill the grid again , its easy to display
ta mu198 reputationPosted Sep 7, 2013, 10:57 AM EDT