TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
690
1.3k
219.7k
Delete multiple rows
Mar 15 2019 9:13 AM
Hi,
I wrote a little codes to select multiple rows from my datagridview and delete at once from my database. Its delete all the selected rows from my datagridview but curiosly its doesnt delete from my database. I can resolv it please. Thank you.
private void button1_Click(object sender, EventArgs e)
{
conn = new SqlConnection("Data Source = (LocalDB)\\MSSQLLocalDB; AttachDbFilename=C:\\Flexit_GovFAA\\Forcas_Armadas_Angolanas\\App_Datas\\FlexAccounting.mdf;Integrated Security = True");
comm = new SqlCommand();
if (conn.State != ConnectionState.Open)
conn.Open();
foreach (DataGridViewRow item in this.dgvLivro1.SelectedRows)
{
dgvLivro1.Rows.RemoveAt(item.Index);
}
}
Reply
Answers (
3
)
In interview i faced one question i need answer for..
How to add regular expression validator programatically in .