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
firas shaar
NA
15
17.6k
how to delete multirows
Sep 14 2014 11:33 AM
hi
I delete rows in datagridview using chcekbox column
I write the following code
private void btndelpay_Click(object sender, EventArgs e)
{
DialogResult dr = MessageBox.Show("delete row", "do you want to delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
if (dr == DialogResult.Yes)
{
DataGridViewRow row = new DataGridViewRow();
for (int i = 0; i < gridviewimppays.Rows.Count; i++)
{
row = gridviewimppays.Rows[i];
if (Convert.ToBoolean(row.Cells[0].Value) == true)
{
if (ImprestsPaysMgr.DeleteImprestsPays(int.Parse(row.Cells["ID"].Value.ToString())))
gridviewimppays.Rows.Remove(row);
i--;
}
}
my prolblem is
how to cancel check from rows in datagridview in chechboxes column when the user select dialogResult.NO
Reply
Answers (
2
)
how to print invoice In Crystal Report viewer
how to fetch all rows inserted in datagridview in c#